From 6da876139962913ad2891d88f0b02cef1e5d68dd Mon Sep 17 00:00:00 2001 From: Caio SBA Date: Wed, 20 Feb 2013 14:35:31 -0300 Subject: [PATCH] Check for property first (#1901476) --- misc/ajax.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/misc/ajax.js b/misc/ajax.js index 900ca1d..90c3bb8 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); } } -- 1.7.2.5