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 f337c39 commit 0b1db66Copy full SHA for 0b1db66
1 file changed
lib/logger.js
@@ -287,13 +287,7 @@ class Logger {
287
* @private
288
*/
289
[kIsError](value) {
290
- // TODO(@mertcanaltin): Use ErrorIsError from primordials when available
291
- // For now, use manual check until ErrorIsError is added to primordials
292
-
293
- return value !== null &&
294
- typeof value === 'object' &&
295
- (ObjectPrototypeToString(value) === '[object Error]' ||
296
- value instanceof Error);
+ return Error.isError(value);
297
}
298
299
/**
0 commit comments