tc39 / proposal-is-error

ECMAScript Proposal, specs, and reference implementation for Error.isError
https://tc39.es/proposal-is-error/
MIT License
74 stars 2 forks source link

instanceof #1

Closed letmaik closed 8 years ago

letmaik commented 8 years ago

This proposal should say somewhere why obj instanceof Error is not "reliable", if that is the case.

ljharb commented 8 years ago

instanceof is indeed always unreliable, not the least of which is because cross-realm Error objects will report a false negative. I'll add a note about it to the readme.