Skip to content

Commit

Permalink
fixup! Promise resolve and reject now return Interrupt errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov committed Oct 24, 2024
1 parent fba0ace commit e0f78d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builtin_promise.go
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,8 @@ func (r *Runtime) wrapPromiseReaction(fObj *Object) func(interface{}) error {
// go func() {
// time.Sleep(500 * time.Millisecond) // or perform any other blocking operation
// loop.RunOnLoop(func(*goja.Runtime) { // resolve() must be called on the loop, cannot call it here
// resolve(result)
// err := resolve(result)
// // Handle uncatchable errors (e.g. by stopping the loop, panicking or setting a flag)
// })
// }()
// }
Expand Down

0 comments on commit e0f78d1

Please sign in to comment.