Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 7eefcfe

Browse files
committed
fix(interimElement): improve hide/cancel promise timings
1 parent 8ccf67e commit 7eefcfe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/services/interimElement/interimElement.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ function InterimElementProvider() {
282282
*/
283283
function hide(response) {
284284
var interimElement = stack.shift();
285-
return interimElement && interimElement.remove().then(function() {
285+
return $q.when(interimElement && interimElement.remove()).then(function() {
286286
interimElement.deferred.resolve(response);
287287
});
288288
}
@@ -301,9 +301,9 @@ function InterimElementProvider() {
301301
*/
302302
function cancel(reason) {
303303
var interimElement = stack.shift();
304-
return $q.when(interimElement && interimElement.remove().then(function() {
304+
return $q.when(interimElement && interimElement.remove()).then(function() {
305305
interimElement.deferred.reject(reason);
306-
}));
306+
});
307307
}
308308

309309

0 commit comments

Comments
 (0)