Skip to content

Commit e7e752f

Browse files
committed
support for returning Env.Value
1 parent 2b62265 commit e7e752f

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
@@ -2926,6 +2926,10 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
29262926
return value.js_obj.toValue();
29272927
}
29282928

2929+
if (T == Value) {
2930+
return value.value;
2931+
}
2932+
29292933
if (T == Promise) {
29302934
// we're returning a v8.Promise
29312935
return value.promise.toObject().toValue();

0 commit comments

Comments
 (0)