We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ec55d6 commit 139b0e6Copy full SHA for 139b0e6
1 file changed
lib/templates/plugin.client.js
@@ -8,7 +8,7 @@ const colorMode = window['<%= options.globalName %>']
8
const getForcedColorMode = route => route.matched[0] && route.matched[0].components.default.options.colorMode
9
10
export default function (ctx, inject) {
11
- let data = ctx.nuxtState.colorMode
+ let data = ctx.nuxtState ? ctx.nuxtState.colorMode : null
12
// For SPA mode or fallback
13
if (!data) {
14
data = {
0 commit comments