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

Commit 6815faf

Browse files
marosoftandrewseguin
authored andcommitted
fix(interim): validate the interim element while closing it (#11509)
Reverting part of the previous commit as it introduced breaking changes to the nested menu. Fixes #11507 Relates to #10715
1 parent 8fd6daf commit 6815faf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/services/interimElement/interimElement.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ function InterimElementProvider() {
358358
}
359359

360360
// Hide the latest showing interim element.
361-
return closeElement(showingInterims.pop());
361+
return closeElement(showingInterims[showingInterims.length - 1]);
362362

363363
function closeElement(interim) {
364364

@@ -373,6 +373,7 @@ function InterimElementProvider() {
373373
hidePromises.splice(hidePromises.indexOf(hideAction), 1);
374374
});
375375

376+
showingInterims.splice(showingInterims.indexOf(interim), 1);
376377
hidePromises.push(hideAction);
377378

378379
return interim.deferred.promise;

0 commit comments

Comments
 (0)