apvarun / toastify-js

Pure JavaScript library for better notification messages
https://apvarun.github.io/toastify-js/
MIT License
2.13k stars 230 forks source link

Preserve 0 as duration, so that we can have toasts which will not clo… #46

Closed danielkaiser80 closed 4 years ago

danielkaiser80 commented 4 years ago

…se automatically.

The code / documentation made me think, that it was intended to have such non-closing toasts; but as 0 is falsy, this was not possible without a trick (setting the options again after creating the toastify object).

marekstodolny commented 4 years ago

Yeah, the || 3000 trick to set a default value doesn't work with 0. I think that -1 is counter-intuitive