Mercurial > hg > isophonics-drupal-site
diff core/modules/quickedit/js/util.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 |
line wrap: on
line diff
--- a/core/modules/quickedit/js/util.js Mon Apr 23 09:33:26 2018 +0100 +++ b/core/modules/quickedit/js/util.js Mon Apr 23 09:46:53 2018 +0100 @@ -85,11 +85,13 @@ }, success: function success(response, status) { - for (var i in response) { - if (response.hasOwnProperty(i) && response[i].command && this.commands[response[i].command]) { - this.commands[response[i].command](this, response[i], status); + var _this = this; + + Object.keys(response || {}).forEach(function (i) { + if (response[i].command && _this.commands[response[i].command]) { + _this.commands[response[i].command](_this, response[i], status); } - } + }); }, base: $submit.attr('id'),