aboutsummaryrefslogtreecommitdiff
path: root/resources/assets/javascripts/bootstrap/files.js
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2022-05-03 12:09:37 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2022-05-03 12:09:37 +0000
commit79c112f6aea337853209116a1fbd42c534b34370 (patch)
tree35df4cc3b14c2b0faf427aa56923e0f04f84e350 /resources/assets/javascripts/bootstrap/files.js
parent33d059072ac4645572b20ca4f66d72fed15dba0c (diff)
fix js errors, fixes #968
Closes #968 Merge request studip/studip!558
Diffstat (limited to 'resources/assets/javascripts/bootstrap/files.js')
-rw-r--r--resources/assets/javascripts/bootstrap/files.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/resources/assets/javascripts/bootstrap/files.js b/resources/assets/javascripts/bootstrap/files.js
index ae47af4..7118e08 100644
--- a/resources/assets/javascripts/bootstrap/files.js
+++ b/resources/assets/javascripts/bootstrap/files.js
@@ -1,4 +1,3 @@
-/*jslint esversion: 6 */
function searchMoreFiles (button) {
var table = $(button).closest('table');
var loading = $('<div class="loading" style="padding: 10px">').html(
@@ -76,7 +75,7 @@ jQuery(document).on('ajaxComplete', (event, xhr) => {
var payload = false;
function process(key, handler) {
- if (!changes.hasOwnProperty(key)) {
+ if (changes[key] === undefined) {
return;
}
@@ -86,10 +85,11 @@ jQuery(document).on('ajaxComplete', (event, xhr) => {
if (payload === false) {
payload = JSON.parse(xhr.responseText);
}
- if (payload.hasOwnProperty(key)) {
+ if (payload[key] !== undefined) {
values = payload[key];
}
} catch (e) {
+ console.log('Error parsing payload', e);
}
}
@@ -105,4 +105,4 @@ jQuery(document).on('ajaxComplete', (event, xhr) => {
});
process('close_dialog', STUDIP.Dialog.close);
-}); \ No newline at end of file
+});