deep-freeze-node icon indicating copy to clipboard operation
deep-freeze-node copied to clipboard

remove unnecessary falsy check

Open mojavelinux opened this issue 6 years ago • 2 comments

The function is safe against falsy values and the tests prove it.

mojavelinux avatar Dec 30 '18 11:12 mojavelinux

I also think we can remove the !(property instanceof Object) check because the only thing it will catch is null. But null is already caught by Object.isFrozen(property) (plus the function is safe against null anyway).

mojavelinux avatar Dec 30 '18 11:12 mojavelinux

Be sure to view with no whitespace enabled to see that this is a 2-line change.

https://github.com/AnatoliyGatt/deep-freeze-node/pull/9/files?w=1

mojavelinux avatar Dec 30 '18 12:12 mojavelinux