Skip to content

Commit cbd5c95

Browse files
jayneticsIvanGoncharov
authored andcommitted
Defensively verify that Symbol.for is available (#2009)
closes #2007
1 parent 16db20c commit cbd5c95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jsutils/nodejsCustomInspectSymbol.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @flow strict
22

33
const nodejsCustomInspectSymbol =
4-
typeof Symbol === 'function'
4+
typeof Symbol === 'function' && typeof Symbol.for === 'function'
55
? Symbol.for('nodejs.util.inspect.custom')
66
: undefined;
77

0 commit comments

Comments
 (0)