From 1d378ff882353b32716837d3ff901305e0aa05a8 Mon Sep 17 00:00:00 2001 From: David Rothstein Date: Sat, 30 Mar 2013 14:36:11 -0400 Subject: Issue #1901476 by caiosba | mstef: Fixed Uncaught TypeError: Cannot read property 'command' of undefined in ajax.js. --- misc/ajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'misc/ajax.js') diff --git a/misc/ajax.js b/misc/ajax.js index 900ca1d22..90c3bb8bb 100644 --- a/misc/ajax.js +++ b/misc/ajax.js @@ -396,7 +396,7 @@ Drupal.ajax.prototype.success = function (response, status) { Drupal.freezeHeight(); for (var i in response) { - if (response[i]['command'] && this.commands[response[i]['command']]) { + if (response.hasOwnProperty(i) && response[i]['command'] && this.commands[response[i]['command']]) { this.commands[response[i]['command']](this, response[i], status); } } -- cgit v1.2.3