We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4cdc514 commit 181ef69Copy full SHA for 181ef69
1 file changed
simpletoast.js
@@ -3,7 +3,7 @@
3
*/
4
(() => {
5
if (window !== window.top) return;
6
- const version = buildVersion(1, 7, 1);
+ const version = buildVersion(1, 7, 2);
7
if (window.SimpleToast) {
8
if (SimpleToast.version) {
9
if (SimpleToast.version >= version.number) return;
@@ -131,7 +131,8 @@
131
if (typeof arguments[0] === 'string') {
132
text = arguments[0];
133
}
134
- if (!text) return blankToast;
+ const safeToast = Object.assign({}, blankToast);
135
+ if (!text) return safeToast;
136
const id = count++;
137
const el = document.createElement('div');
138
if (className) {
@@ -213,7 +214,8 @@
213
214
if (timeout) {
215
startTimeout();
216
- return toast;
217
+ Object.keys(safeToast).forEach((key) => safeToast[key] = toast[key]);
218
+ return safeToast;
219
220
221
Toast.version = version.number;
0 commit comments