Skip to content

Commit

Permalink
fix(forceinject): fixed forceInject failing when ...ready() is called…
Browse files Browse the repository at this point in the history
… in a plugin in lazy mode

fixed forceInject failing when ...ready() is called in a plugin in lazy mode

re #366
  • Loading branch information
lupas committed Jan 17, 2021
1 parent b9ad3f0 commit c15222f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/plugins/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit c15222f

Please sign in to comment.