Skip to content

Commit 632b57a

Browse files
VariantObject::NodeGet should always return a value to avoid the error:
# Fatal error in , line 0 # Check failed: !IsTheHole(*slot, isolate).
1 parent b7599d1 commit 632b57a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/disp.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,12 +1112,18 @@ void VariantObject::NodeGet(Local<Name> name, const PropertyCallbackInfoGetter&
11121112
if ((self->value.vt & VT_ARRAY) != 0) {
11131113
args.GetReturnValue().Set((uint32_t)self->value.ArrayLength());
11141114
}
1115-
}
1115+
else {
1116+
args.GetReturnValue().SetUndefined();
1117+
}
1118+
}
11161119
else {
11171120
Local<Function> func;
11181121
if (clazz_methods.get(isolate, id, &func)) {
11191122
args.GetReturnValue().Set(func);
11201123
}
1124+
else {
1125+
args.GetReturnValue().SetUndefined();
1126+
}
11211127
}
11221128
}
11231129

0 commit comments

Comments
 (0)