Skip to content

Commit

Permalink
If theme change fails, log error message rather than show it in the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
mathjazz committed Dec 5, 2023
1 parent 6e27dc1 commit e6b4cc7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pontoon/base/static/js/theme-switcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,9 @@ $(function () {
$('body').data('theme', theme);
},
error: function (request) {
if (request.responseText === 'error') {
Pontoon.endLoader('Oops, something went wrong.', 'error');
} else {
Pontoon.endLoader(request.responseText, 'error');
}
Pontoon.endLoader('Oops, something went wrong.', 'error');
// eslint-disable-next-line no-console
console.log(request);
},
});
});
Expand Down

0 comments on commit e6b4cc7

Please sign in to comment.