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 69d3d13 commit 209c9f5Copy full SHA for 209c9f5
packages/shell-api/src/custom-inspect.ts
@@ -44,8 +44,9 @@ export function addCustomInspect(obj: any) {
44
typeof obj === 'object' &&
45
obj !== null &&
46
!obj._bsontype &&
47
- !(obj instanceof Date) &&
48
- !(obj instanceof RegExp)
+ !['[object Date]', '[object RegExp]'].includes(
+ Object.prototype.toString.call(obj)
49
+ )
50
) {
51
addInspectSymbol(obj);
52
for (const value of Object.values(obj)) {
0 commit comments