Skip to content

Commit

Permalink
fixed a fatal bug
Browse files Browse the repository at this point in the history
  • Loading branch information
supernomad committed Jun 21, 2015
1 parent 0e71753 commit 1f579f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/helpers/typeHelper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function doesExist(obj) {
return obj != null && obj != undefined && !isNaN(obj);
return obj != null && obj != undefined;
}

function isObject(obj) {
Expand All @@ -19,7 +19,7 @@ function isBoolean(obj) {
}

function isNumber(obj) {
return doesExist(obj) && typeof obj === "number";
return doesExist(obj) && !isNaN(obj) && typeof obj === "number";
}

function isType(obj, typ) {
Expand Down

0 comments on commit 1f579f2

Please sign in to comment.