We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f252a4 commit 1f56578Copy full SHA for 1f56578
lib/internal/util.js
@@ -96,7 +96,7 @@ function isError(e) {
96
// An error could be an instance of Error while not being a native error
97
// or could be from a different realm and not be instance of Error but still
98
// be a native error.
99
- return isNativeError(e) || e instanceof Error;
+ return Error.isError ? Error.isError(e) : isNativeError(e) || e instanceof Error;
100
}
101
102
// Keep a list of deprecation codes that have been warned on so we only warn on
0 commit comments