Skip to content

Commit 393c331

Browse files
committed
fixup: enable for closure too
1 parent 6ea0420 commit 393c331

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

quickjs.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -8886,8 +8886,7 @@ static int JS_SetPropertyInternal2(JSContext *ctx, JSValue obj, JSAtom prop,
88868886
// try give function name in every possible way
88878887
if (JS_IsFunction(ctx, val)) {
88888888
JSObject *vf = JS_VALUE_GET_OBJ(val);
8889-
if (vf->class_id == JS_CLASS_BYTECODE_FUNCTION &&
8890-
vf->u.func.var_refs == NULL) {
8889+
if (vf->class_id == JS_CLASS_BYTECODE_FUNCTION) {
88918890
const char* name = get_func_name(ctx, val);
88928891
if (strcmp(name, "") == 0) {
88938892
JSValue js_value = JS_AtomToValue(ctx, prop);

0 commit comments

Comments
 (0)