Mercurial > hg > isophonics-drupal-site
diff core/modules/quickedit/js/util.es6.js @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
line wrap: on
line diff
--- a/core/modules/quickedit/js/util.es6.js Mon Apr 23 09:33:26 2018 +0100 +++ b/core/modules/quickedit/js/util.es6.js Mon Apr 23 09:46:53 2018 +0100 @@ -58,7 +58,7 @@ */ Drupal.quickedit.util.networkErrorModal = function (title, message) { const $message = $(`<div>${message}</div>`); - var networkErrorModal = Drupal.dialog($message.get(0), { + const networkErrorModal = Drupal.dialog($message.get(0), { title, dialogClass: 'quickedit-network-error', buttons: [ @@ -181,11 +181,11 @@ * The HTTP status code. */ success(response, status) { - for (const i in response) { - if (response.hasOwnProperty(i) && response[i].command && this.commands[response[i].command]) { + Object.keys(response || {}).forEach((i) => { + if (response[i].command && this.commands[response[i].command]) { this.commands[response[i].command](this, response[i], status); } - } + }); }, base: $submit.attr('id'), element: $submit[0],