#335741 by electricmonk. Do not recurse over non-objects.

5.x
Neil Drumm 2009-02-26 06:46:48 +00:00
parent d33a7a8fc5
commit b7715b93ff
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ Drupal.jsEnabled = document.getElementsByTagName && document.createElement && do
*/ */
Drupal.extend = function(obj) { Drupal.extend = function(obj) {
for (var i in obj) { for (var i in obj) {
if (this[i]) { if (this[i] && (typeof(this[i]) == 'function' || typeof(this[i]) == 'object')) {
Drupal.extend.apply(this[i], [obj[i]]); Drupal.extend.apply(this[i], [obj[i]]);
} }
else { else {