Skip to content

Commit

Permalink
added null to the undefined check
Browse files Browse the repository at this point in the history
  • Loading branch information
dtracers committed Jun 16, 2016
1 parent 43106ed commit df1a2bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/js/protobufUtils/classCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ define([], function() {
/**
* Returns true if an object is not defined.
*
* This is if it is actually equal to undefined OR is null.
*
* @param {Object} object - the object that is being tested.
* @returns {Boolean} true if the object is not defined. (Only not defined being null will return false)
*/
var isUndefined = function(object) {
return typeof object === 'undefined';
return typeof object === 'undefined' || object == null;
};

/**
Expand Down

0 comments on commit df1a2bc

Please sign in to comment.