Commit e187ad3f authored by Romain Courteaud's avatar Romain Courteaud

Prevent rejecting the loop if the result cancelled itself

parent bfed7a73
...@@ -108,7 +108,14 @@ ...@@ -108,7 +108,14 @@
return reject(e); return reject(e);
} }
callback_promise = new RSVP.Queue(result).push(undefined, reject); callback_promise = new RSVP.Queue(result)
.push(undefined, function handleEventCallbackError(error) {
// Prevent rejecting the loop, if the result cancelled itself
if (!(error instanceof RSVP.CancellationError)) {
canceller();
reject(error);
}
});
}; };
target.addEventListener(type, handle_event_callback, useCapture); target.addEventListener(type, handle_event_callback, useCapture);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment