create store only when available

This commit is contained in:
Pooya Parsa 2017-05-02 15:36:22 +04:30
parent affbc9c81f
commit a04a563f8d

View File

@ -35,7 +35,9 @@ const defaultTransition = <%=
export { NuxtError }
export function createApp (ssrContext) {
<% if (store) { %>
const store = createStore()
<% } %>
const router = createRouter()
if (process.browser) {