mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-07 09:22:27 +00:00
create store only when available
This commit is contained in:
parent
affbc9c81f
commit
a04a563f8d
@ -35,7 +35,9 @@ const defaultTransition = <%=
|
|||||||
export { NuxtError }
|
export { NuxtError }
|
||||||
|
|
||||||
export function createApp (ssrContext) {
|
export function createApp (ssrContext) {
|
||||||
|
<% if (store) { %>
|
||||||
const store = createStore()
|
const store = createStore()
|
||||||
|
<% } %>
|
||||||
const router = createRouter()
|
const router = createRouter()
|
||||||
|
|
||||||
if (process.browser) {
|
if (process.browser) {
|
||||||
|
Loading…
Reference in New Issue
Block a user