diff --git a/lib/plugins/main.js b/lib/plugins/main.js index aaced530..2a6c740e 100644 --- a/lib/plugins/main.js +++ b/lib/plugins/main.js @@ -148,5 +148,7 @@ function forceInject (ctx, inject, key, value) { inject(key, value) const injectKey = '$' + key ctx[injectKey] = value - window.<%= globals.nuxt %>.$options[injectKey] = value + if (typeof window !== "undefined") { + window.<%= globals.nuxt %>.$options[injectKey] = value + } } \ No newline at end of file