Skip to content

Commit 10e80d0

Browse files
IvanGoncharovmjmahone
authored andcommitted
instanceOf: Check that one of the names in non-empty string (#1357)
Fixes #1356
1 parent bc03768 commit 10e80d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jsutils/instanceOf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default (process.env.NODE_ENV === 'production'
3131
if (value) {
3232
const valueClass = value.constructor;
3333
const className = constructor.name;
34-
if (valueClass && valueClass.name === className) {
34+
if (className && valueClass && valueClass.name === className) {
3535
throw new Error(
3636
`Cannot use ${className} "${value}" from another module or realm.
3737

0 commit comments

Comments
 (0)