> require('var_dump')(Object.create(null))
TypeError: Cannot read property 'name' of undefined
at varIsObject (/Users/liuboyuan01/_pea3nut/project/mnt/var-dump/node_modules/var_dump/index.js:140:25)
at _dump (/Users/liuboyuan01/_pea3nut/project/mnt/var-dump/node_modules/var_dump/index.js:26:14)
at var_dump (/Users/liuboyuan01/_pea3nut/project/mnt/var-dump/node_modules/var_dump/index.js:183:17)
> throw
There is a way resolving:
- Check all
.constructor existing before .constructor.name
- Replace
obj.hasOwnProperty(i) to Object.prototype.hasOwnProperty.call(obj, i)
There is a way resolving:
.constructorexisting before.constructor.nameobj.hasOwnProperty(i)toObject.prototype.hasOwnProperty.call(obj, i)