Skip to content

Commit

Permalink
Using full equal sign to check undefined or null
Browse files Browse the repository at this point in the history
  • Loading branch information
starkwang committed Apr 17, 2018
1 parent aa30ca1 commit 741490f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/tool.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ export function isBoolean(value) {
return Object.prototype.toString.call(value) == '[object Boolean]';
}
export function isUndefined(value) {
return Object.prototype.toString.call(value) == '[object Undefined]';
return value === undefined;
}
export function isNull(value) {
return Object.prototype.toString.call(value) == '[object Null]';
return value === null;
}
export function isSymbol(value) {
return Object.prototype.toString.call(value) == '[object Symbol]';
Expand Down

0 comments on commit 741490f

Please sign in to comment.