Skip to content

Commit cdca597

Browse files
Update src/bun.js/bindings/CatchScope.zig
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
1 parent 615f0de commit cdca597

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bun.js/bindings/CatchScope.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ pub fn clearException(self: *CatchScope) void {
146146
}
147147

148148
pub fn tryTakeException(self: *CatchScope) ?*jsc.Exception {
149-
if (self.exception() != null) {
149+
if (self.exception()) |exception| {
150150
self.clearException();
151-
return self.exception();
151+
return exception;
152152
}
153153
return null;
154154
}

0 commit comments

Comments
 (0)