From b7715b93ff34e1f760a1d999cc2c79792e81617c Mon Sep 17 00:00:00 2001 From: Neil Drumm Date: Thu, 26 Feb 2009 06:46:48 +0000 Subject: [PATCH] #335741 by electricmonk. Do not recurse over non-objects. --- misc/drupal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/drupal.js b/misc/drupal.js index a22eb387ba12..933811201bb7 100644 --- a/misc/drupal.js +++ b/misc/drupal.js @@ -12,8 +12,8 @@ Drupal.jsEnabled = document.getElementsByTagName && document.createElement && do */ Drupal.extend = function(obj) { for (var i in obj) { - if (this[i]) { - Drupal.extend.apply(this[i], [obj[i]]); + if (this[i] && (typeof(this[i]) == 'function' || typeof(this[i]) == 'object')) { + Drupal.extend.apply(this[i], [obj[i]]); } else { this[i] = obj[i];