Skip to content

Commit 4cdc514

Browse files
committed
Fix missing "setText" on blank toasts
1 parent 0698da5 commit 4cdc514

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

simpletoast.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
(() => {
55
if (window !== window.top) return;
6-
const version = buildVersion(1, 7, 0);
6+
const version = buildVersion(1, 7, 1);
77
if (window.SimpleToast) {
88
if (SimpleToast.version) {
99
if (SimpleToast.version >= version.number) return;
@@ -121,9 +121,11 @@
121121
}, 1000);
122122
}
123123

124+
function noop() {}
124125
const blankToast = {
126+
setText: noop,
125127
exists: () => false,
126-
close: () => {},
128+
close: noop,
127129
};
128130
function Toast({title, text, className, css = {}, buttons, timeout, onClose}) {
129131
if (typeof arguments[0] === 'string') {

0 commit comments

Comments
 (0)