Replacing setImmediate with setTimeout (#2683)
* Adding an import for setImmediate `setImmediate` is a global in node, but it is technically from the `timers` module, and it is not global in web. * Replacing node specific call to `setImmediate` `setTimeout` is available globally in both node and web
This commit is contained in:
@@ -28,7 +28,7 @@ export default Vue.extend({
|
||||
open: function (message, action, time) {
|
||||
const toast = { message: message, action: action || (() => { }), isOpen: false, timeout: null }
|
||||
toast.timeout = setTimeout(this.close, time || 3000, toast)
|
||||
setImmediate(() => { toast.isOpen = true })
|
||||
setTimeout(() => { toast.isOpen = true })
|
||||
if (this.toasts.length > 4) {
|
||||
this.remove(0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user