From 8dd1bfe16995cb07777789a99b40447f36f4a665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Tue, 29 Aug 2017 21:04:14 +0200 Subject: [PATCH] Add app in store only if store exists --- lib/app/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/app/index.js b/lib/app/index.js index 7ba695c024..d3dc52750a 100644 --- a/lib/app/index.js +++ b/lib/app/index.js @@ -50,7 +50,7 @@ async function createApp (ssrContext) { // making them available everywhere as `this.$router` and `this.$store`. const app = { router, - <% if (store) { %> store,<% } %> + <% if (store) { %>store,<% } %> _nuxt: { defaultTransition, transitions: [ defaultTransition ], @@ -86,10 +86,10 @@ async function createApp (ssrContext) { }, ...App } - + <% if (store) { %> // Make app available in store store.app = app - + <% } %> const next = ssrContext ? ssrContext.next : location => app.router.push(location) let route if (ssrContext) {