Skip to content

Commit 6ef1f5b

Browse files
committed
fix(JS): EValue automatically freeing the js
1 parent 419efc0 commit 6ef1f5b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/plugins/stack.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct Stack<std::any>
2121

2222
static JSValue pushJS(EContext* ctx, std::any value)
2323
{
24-
return SerializeData(value, ctx).pushJS();
24+
return JS_DupValue((JSContext*)ctx->GetState(), SerializeData(value, ctx).pushJS());
2525
}
2626

2727
static std::any getLua(EContext* ctx, int ref)

vendor/embedder

0 commit comments

Comments
 (0)