Skip to content

Commit

Permalink
fixes #857. All the generics now ignores the call of the method if th…
Browse files Browse the repository at this point in the history
…e passed element is null or undefined. #each now doesnt iterate the windows if you pass null or undefined as the iterable.
  • Loading branch information
fabiomcosta committed Apr 7, 2010
1 parent cbbacd8 commit abc0103
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Source/Core/Core.js
Expand Up @@ -166,6 +166,7 @@ var implement = function(name, method){
if (previous == null || !previous.$protected) this.prototype[name] = method;

if (this[name] == null && typeOf(method) == 'function') extend.call(this, name, function(item){
if (item == null) return;
return method.apply(item, Array.prototype.slice.call(arguments, 1));
});

Expand Down

0 comments on commit abc0103

Please sign in to comment.