File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -770,20 +770,18 @@ export abstract class Menu extends LitElement {
770
770
*/
771
771
private animateClose ( ) {
772
772
let resolve ! : ( value : unknown ) => void ;
773
- let reject ! : ( ) => void ;
774
773
775
774
// This promise blocks the surface position controller from setting
776
775
// display: none on the surface which will interfere with this animation.
777
- const animationEnded = new Promise ( ( res , rej ) => {
776
+ const animationEnded = new Promise ( ( res ) => {
778
777
resolve = res ;
779
- reject = rej ;
780
778
} ) ;
781
779
782
780
const surfaceEl = this . surfaceEl ;
783
781
const slotEl = this . slotEl ;
784
782
785
783
if ( ! surfaceEl || ! slotEl ) {
786
- reject ( ) ;
784
+ resolve ( false ) ;
787
785
return animationEnded ;
788
786
}
789
787
@@ -870,7 +868,7 @@ export abstract class Menu extends LitElement {
870
868
animation . cancel ( ) ;
871
869
child . classList . toggle ( 'md-menu-hidden' , false ) ;
872
870
} ) ;
873
- reject ( ) ;
871
+ resolve ( false ) ;
874
872
} ) ;
875
873
876
874
surfaceHeightAnimation . addEventListener ( 'finish' , ( ) => {
You can’t perform that action at this time.
0 commit comments