From 479c5ed0d51724b40092c9ee6dbdfe0cf0e0926b Mon Sep 17 00:00:00 2001 From: Mikkel Hoegh Date: Wed, 31 Aug 2011 02:37:33 +0200 Subject: [PATCH] Added missing .hasOwnProperty check. This is required when iterating over array keys, since some of them may be inherited from the prototype chain, and thus not one of the actual values in the array. --- includes/jquery.drilldown.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/includes/jquery.drilldown.js b/includes/jquery.drilldown.js index 3b6f181..5114e53 100644 --- a/includes/jquery.drilldown.js +++ b/includes/jquery.drilldown.js @@ -80,7 +80,7 @@ var trail = $(settings.trail); trail.empty(); for (var key in breadcrumb) { - if (breadcrumb[key]) { + if (breadcrumb.hasOwnProperty(key) && breadcrumb[key]) { // We don't use the $().clone() method here because of an // IE & jQuery 1.2 bug. var clone = $('') -- 1.7.5.4