Skip to content

Commit 0b1db66

Browse files
committed
used Error.isError
1 parent f337c39 commit 0b1db66

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/logger.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,7 @@ class Logger {
287287
* @private
288288
*/
289289
[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);
290+
return Error.isError(value);
297291
}
298292

299293
/**

0 commit comments

Comments
 (0)