Commit ab41352f authored by Romain Courteaud's avatar Romain Courteaud

erp5_core: prevent rejecting the loop, if the result cancelled itself

parent 60c948da
...@@ -104,7 +104,14 @@ ...@@ -104,7 +104,14 @@
result = reject(e); result = 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