diff --git a/src/ecmascript/quickjs/element.c b/src/ecmascript/quickjs/element.c index f89e3d456..d2b61c403 100644 --- a/src/ecmascript/quickjs/element.c +++ b/src/ecmascript/quickjs/element.c @@ -608,9 +608,10 @@ js_element_get_property_firstChild(JSContext *ctx, JSValueConst this_val) //dom_node_unref(el); return JS_NULL; } - //dom_node_unref(el); + JSValue rr = getElement(ctx, node); + dom_node_unref(node); - return getElement(ctx, node); + return rr; } static JSValue