Commit dcca4e59 authored by Romain Courteaud's avatar Romain Courteaud

[indexeddb] fix cancellation issue

parent 008516f5
Pipeline #11327 passed with stage
in 0 seconds
...@@ -149,10 +149,7 @@ ...@@ -149,10 +149,7 @@
} catch (error) { } catch (error) {
reject(error); reject(error);
} }
return new RSVP.Queue() return new RSVP.Queue(result)
.push(function () {
return result;
})
.push(function (final_result) { .push(function (final_result) {
canceller(); canceller();
resolve(final_result); resolve(final_result);
...@@ -184,10 +181,7 @@ ...@@ -184,10 +181,7 @@
reject(error); reject(error);
} }
tx.oncomplete = function () { tx.oncomplete = function () {
return new RSVP.Queue() return new RSVP.Queue(result)
.push(function () {
return result;
})
.push(resolve, function (error) { .push(resolve, function (error) {
canceller(); canceller();
reject(error); reject(error);
......
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