Commit 2e0a80bb authored by Romain Courteaud's avatar Romain Courteaud

erp5_core: fix cancellation handling

parent 1cfbf91f
......@@ -101,20 +101,10 @@
try {
result = callback(evt);
} catch (e) {
result = RSVP.reject(e);
return reject(e);
}
callback_promise = result;
new RSVP.Queue()
.push(function () {
return result;
})
.push(undefined, function (error) {
if (!(error instanceof RSVP.CancellationError)) {
canceller();
reject(error);
}
});
callback_promise = new RSVP.Queue(result).push(undefined, reject);
};
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