File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1414 console . log ( `SimpleToast(v${ localToast . versionString } ): Publicized` ) ;
1515 }
1616} ) ( this , ( ) => {
17- const version = buildVersion ( 1 , 12 , 0 ) ;
17+ const version = buildVersion ( 1 , 13 , 0 ) ;
1818 const style = {
1919 root : {
2020 display : 'flex' ,
166166 }
167167
168168 let closeType = 'unknown' ;
169+ const safeToast = { } ;
169170 const toast = {
170171 setText : ( newText ) => {
171172 if ( ! newText || ! toast . exists ( ) ) return ;
177178 root . removeChild ( el ) ;
178179 toasts . delete ( id ) ;
179180 if ( typeof onClose === 'function' ) {
180- onClose ( toast , closeType ) ;
181+ onClose . call ( safeToast , closeType , safeToast ) ;
181182 }
182183 } ,
183184 timedout : ( ) => {
235236 if ( timeout ) {
236237 startTimeout ( ) ;
237238 }
238- const safeToast = { } ;
239239 Object . keys ( blankToast ) . forEach ( ( key ) => safeToast [ key ] = toast [ key ] ) ;
240240 return safeToast ;
241241 }
You can’t perform that action at this time.
0 commit comments