diff --git a/packages/toast/index.js b/packages/toast/index.js index b004aa92b..9d19539ca 100644 --- a/packages/toast/index.js +++ b/packages/toast/index.js @@ -20,6 +20,11 @@ let singleton = true; let currentOptions = { ...defaultOptions }; function createInstance() { + /* istanbul ignore if */ + if (isServer) { + return {}; + } + if (!queue.length || !singleton) { const toast = new (Vue.extend(VueToast))({ el: document.createElement('div') @@ -37,11 +42,6 @@ function transformer(options) { } function Toast(options = {}) { - /* istanbul ignore if */ - if (isServer) { - return; - } - const toast = createInstance(); options = {