We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6f1ee74 + 240140e commit c110853Copy full SHA for c110853
src/v8.zig
@@ -1913,11 +1913,15 @@ pub const Module = struct {
1913
///
1914
/// If IsGraphAsync() is false, the returned Promise is settled.
1915
pub fn evaluate(self: Self, ctx: Context) !Value {
1916
- if (c.v8__Module__Evaluate(self.handle, ctx.handle)) |res| {
1917
- return Value{
1918
- .handle = res,
1919
- };
1920
- } else return error.JsException;
+ const res = c.v8__Module__Evaluate(self.handle, ctx.handle) orelse return error.JsException;
+
+ if (self.getStatus() == .kErrored) {
+ return error.JsException;
+ }
1921
1922
+ return Value{
1923
+ .handle = res,
1924
+ };
1925
}
1926
1927
pub fn getIdentityHash(self: Self) u32 {
0 commit comments