diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-09-01 18:45:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-01 18:45:37 +0300 |
commit | 199d9e5804ec94f5bc59b37a6d74e5a12f1b71c3 (patch) | |
tree | 9faa96220ba732a65b2f58a12cb1aa58dc324699 | |
parent | 1443f2085a5bc7f17cbf565f4fdcc3e2cc18d193 (diff) | |
parent | 393c89142179454d731931e85399685237f2a1bc (diff) |
Merge pull request #33332 from nextcloud/fix-handling-of-internal-errors-when-uploading-theming-files
Fix handling of internal errors when uploading theming files
-rw-r--r-- | apps/theming/js/settings-admin.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/theming/js/settings-admin.js b/apps/theming/js/settings-admin.js index b33beda43d8..9fd1639ec3e 100644 --- a/apps/theming/js/settings-admin.js +++ b/apps/theming/js/settings-admin.js @@ -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(); } |