diff --git a/object.js b/object.js index 5cb3162..a7dcf3a 100755 --- a/object.js +++ b/object.js @@ -188,8 +188,7 @@ function makeConstructor(name, a, b){ // set an informative .toString... // NOTE: do this only if .toString(..) is not defined by user... - if(cls_proto - && cls_proto.toString() == ({}).toString()){ + if((cls_proto || {}).toString() == ({}).toString()){ // XXX is this the right way to go or should we set this openly??? Object.defineProperty(_constructor, 'toString', { value: function(){ diff --git a/package.json b/package.json index 1a437f5..65e6f0f 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-object", - "version": "1.0.5", + "version": "1.0.6", "description": "", "main": "object.js", "scripts": {