File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -56,9 +56,10 @@ const MicroModal = (() => {
56
56
}
57
57
58
58
showModal ( event = null ) {
59
+ const openClass = this . config . openClass . split ( ' ' )
59
60
this . activeElement = document . activeElement
60
61
this . modal . setAttribute ( 'aria-hidden' , 'false' )
61
- this . modal . classList . add ( this . config . openClass )
62
+ this . modal . classList . add ( .. .openClass )
62
63
this . scrollBehaviour ( 'disable' )
63
64
this . addEventListeners ( )
64
65
@@ -85,14 +86,14 @@ const MicroModal = (() => {
85
86
}
86
87
this . config . onClose ( this . modal , this . activeElement , event )
87
88
89
+ let openClass = this . config . openClass . split ( ' ' ) // <- old school ftw
88
90
if ( this . config . awaitCloseAnimation ) {
89
- let openClass = this . config . openClass // <- old school ftw
90
91
this . modal . addEventListener ( 'animationend' , function handler ( ) {
91
- modal . classList . remove ( openClass )
92
+ modal . classList . remove ( ... openClass )
92
93
modal . removeEventListener ( 'animationend' , handler , false )
93
94
} , false )
94
95
} else {
95
- modal . classList . remove ( this . config . openClass )
96
+ modal . classList . remove ( .. .openClass )
96
97
}
97
98
}
98
99
You can’t perform that action at this time.
0 commit comments