Skip to content

Commit

Permalink
Update js/modules/require_impl.go
Browse files Browse the repository at this point in the history
Co-authored-by: Joan López de la Franca Beltran <[email protected]>
  • Loading branch information
mstoykov and joanlopez authored Oct 26, 2024
1 parent 6e84cca commit 031cc30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/modules/require_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func getPreviousRequiringFile(vu VU) (string, error) {
// sets the provided promise in such way as to ignore falures
// this is mostly needed as failures are handled separately and we do not want those to lead to stopping the event loop
func promisesThenIgnore(rt *sobek.Runtime, promise *sobek.Promise) {
cal, _ := sobek.AssertFunction(rt.ToValue(promise).ToObject(rt).Get("then"))
call, _ := sobek.AssertFunction(rt.ToValue(promise).ToObject(rt).Get("then"))
handler := rt.ToValue(func(_ sobek.Value) {})
_, _ = cal(rt.ToValue(promise), handler, handler)
_, _ = call(rt.ToValue(promise), handler, handler)
}

0 comments on commit 031cc30

Please sign in to comment.