Skip to content

Commit f03fcc9

Browse files
committed
support for returning Env.Value
1 parent c3ad054 commit f03fcc9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/runtime/js.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2889,6 +2889,10 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
28892889
return value.js_obj.toValue();
28902890
}
28912891

2892+
if (T == Value) {
2893+
return value.value;
2894+
}
2895+
28922896
if (T == Promise) {
28932897
// we're returning a v8.Promise
28942898
return value.promise.toObject().toValue();

0 commit comments

Comments
 (0)