Skip to content

Commit 1ce667b

Browse files
committed
Allow a single string argument to be passed
1 parent aeb5770 commit 1ce667b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

simpletoast.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161
let count = 0;
6262

6363
function Toast({text, css, buttons, timeout}) {
64+
if (typeof arguments[0] === 'string') {
65+
text = arguments[0];
66+
}
6467
if (!text) return;
6568
const id = count++;
6669
const el = document.createElement('div');

0 commit comments

Comments
 (0)