Skip to content

Commit 209c9f5

Browse files
lerouxbaddaleax
andauthored
Update packages/shell-api/src/custom-inspect.ts
Co-authored-by: Anna Henningsen <[email protected]>
1 parent 69d3d13 commit 209c9f5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/shell-api/src/custom-inspect.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ export function addCustomInspect(obj: any) {
4444
typeof obj === 'object' &&
4545
obj !== null &&
4646
!obj._bsontype &&
47-
!(obj instanceof Date) &&
48-
!(obj instanceof RegExp)
47+
!['[object Date]', '[object RegExp]'].includes(
48+
Object.prototype.toString.call(obj)
49+
)
4950
) {
5051
addInspectSymbol(obj);
5152
for (const value of Object.values(obj)) {

0 commit comments

Comments
 (0)