Skip to content

Commit 448718d

Browse files
authored
Merge pull request #858 from lightpanda-io/callback_with_new_this
Allow JS Callback to be called with a previously-unseen this.
2 parents 6de55df + 29ac131 commit 448718d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/js.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,7 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
14211421
const this_obj = if (@TypeOf(value) == JsObject)
14221422
value.js_obj
14231423
else
1424-
try self.js_context.valueToExistingObject(value);
1424+
(try self.js_context.zigValueToJs(value)).castTo(v8.Object);
14251425

14261426
return .{
14271427
.id = self.id,

0 commit comments

Comments
 (0)