From 7e6f5dfcf2497dda9efb2d421d9ac86437499ca1 Mon Sep 17 00:00:00 2001 From: Phil DeJarnett Date: Thu, 22 Sep 2011 03:37:28 -0400 Subject: [PATCH] Added hasOwnProperty to the forIn method --- base.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/base.js b/base.js index d623d78..caa84fc 100644 --- a/base.js +++ b/base.js @@ -384,8 +384,10 @@ define(["dojo"], function(dojo){ // scope = scope || d.global; for(var key in obj){ - // FIXME: i feel like these are backwards? should it be function(key, value) ? - callback.call(scope, obj[key], key, obj); + if(obj.hasOwnProperty(key) { + // FIXME: i feel like these are backwards? should it be function(key, value) ? + callback.call(scope, obj[key], key, obj); + } } }