Skip to content

Commit

Permalink
Merge pull request #33332 from nextcloud/fix-handling-of-internal-err…
Browse files Browse the repository at this point in the history
…ors-when-uploading-theming-files

Fix handling of internal errors when uploading theming files
  • Loading branch information
PVince81 authored Sep 1, 2022
2 parents 1443f20 + 393c891 commit 199d9e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/theming/js/settings-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ window.addEventListener('DOMContentLoaded', function () {
},
fail: function (e, response){
var $form = $(e.target).closest('form');
OC.msg.finishedError('#theming_settings_msg', response._response.jqXHR.responseJSON.data.message);
const responseJSON = response._response.jqXHR.responseJSON;
OC.msg.finishedError('#theming_settings_msg', responseJSON && responseJSON.data && responseJSON.data.message ? responseJSON.data.message : t('theming', 'Error uploading the file'));
$form.find('label.button').addClass('icon-upload').removeClass('icon-loading-small');
$('#theming_settings_loading').hide();
}
Expand Down

0 comments on commit 199d9e5

Please sign in to comment.