Skip to content

Commit

Permalink
direct comparison with null returns the error: "VAR is not defined"
Browse files Browse the repository at this point in the history
  • Loading branch information
vitotafuni committed Oct 6, 2010
1 parent 29de8c7 commit 879aa63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Core/Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ this.MooTools = {
// typeOf, instanceOf

var typeOf = this.typeOf = function(item){
if (item == null) return 'null';
if (typeof item == 'undefined' || item == null) return 'null';
if (item.$family) return item.$family();

if (item.nodeName){
Expand Down Expand Up @@ -463,7 +463,7 @@ this.$clear = function(timer){
};

this.$defined = function(obj){
return (obj != null);
return (typeof obj != 'undefined');
};

this.$each = function(iterable, fn, bind){
Expand Down

0 comments on commit 879aa63

Please sign in to comment.