Skip to content

Commit fc7a11b

Browse files
committed
fixup: enable for closure too
1 parent 445aa6c commit fc7a11b

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
@@ -8891,8 +8891,7 @@ static int JS_SetPropertyInternal2(JSContext *ctx, JSValue obj, JSAtom prop,
88918891
// try give function name in every possible way
88928892
if (JS_IsFunction(ctx, val)) {
88938893
JSObject *vf = JS_VALUE_GET_OBJ(val);
8894-
if (vf->class_id == JS_CLASS_BYTECODE_FUNCTION &&
8895-
vf->u.func.var_refs == NULL) {
8894+
if (vf->class_id == JS_CLASS_BYTECODE_FUNCTION) {
88968895
const char* name = get_func_name(ctx, val);
88978896
if (strcmp(name, "") == 0) {
88988897
JSValue js_value = JS_AtomToValue(ctx, prop);

0 commit comments

Comments
 (0)