fix inject for store

This commit is contained in:
Pooya Parsa 2017-12-29 16:01:19 +03:30
parent 61232a61e6
commit 806287e62c

View File

@ -126,6 +126,10 @@ async function createApp (ssrContext) {
key = '$' + key
// Add into app
app[key] = value
<% if (store) { %>
// Add into store
store[key] = app[key]
<% } %>
// Check if plugin not already installed
const installKey = '__nuxt_' + key + '_installed__'
if (Vue[installKey]) return
@ -140,10 +144,6 @@ async function createApp (ssrContext) {
})
}
})
<% if (store) { %>
// Add into store
store[key] = app[key]
<% } %>
}
<% if (store) { %>