File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ <h2>Links</h2>
201201
202202 var getMessageWithClearButton = function ( msg ) {
203203 msg = msg ? msg : 'Clear itself?' ;
204- msg += '<br /><br /><button type="btn button" class="clear">Yes</button>' ;
204+ msg += '<br /><br /><button type="button" class="btn clear">Yes</button>' ;
205205 return msg ;
206206 } ;
207207
@@ -287,6 +287,11 @@ <h2>Links</h2>
287287
288288 var $toast = toastr [ shortCutFunction ] ( msg , title ) ; // Wire up an event handler to a button in the toast, if it exists
289289 $toastlast = $toast ;
290+
291+ if ( typeof $toast === 'undefined' ) {
292+ return ;
293+ }
294+
290295 if ( $toast . find ( '#okBtn' ) . length ) {
291296 $toast . delegate ( '#okBtn' , 'click' , function ( ) {
292297 alert ( 'you clicked me. i was toast #' + toastIndex + '. goodbye!' ) ;
You can’t perform that action at this time.
0 commit comments