Skip to content

Commit 7e3b92d

Browse files
committed
Updating demo.html to resolve null ref issue and resolve bootstrap styling.
2 parents 29d1f68 + 729cdfe commit 7e3b92d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

demo.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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!');

0 commit comments

Comments
 (0)