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

Commit 168ba08

Browse files
committed
When hiding wait for currenlty opening interims
1 parent 72e887d commit 168ba08

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/core/services/interimElement/interimElement.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,16 @@ function InterimElementProvider() {
339339
*
340340
*/
341341
function hide(reason, options) {
342+
342343
if (!showingInterims.length) {
344+
// When there are still interim's opening, then wait for the first interim element to
345+
// finish its opening.
346+
if (showPromises.length) {
347+
return showPromises.shift().finally(function() {
348+
return service.hide(reason, options)
349+
});
350+
}
351+
343352
return $q.when(reason);
344353
}
345354

0 commit comments

Comments
 (0)