mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
Merge pull request #2831 from jasonc08/dev
inject ssrContext into createRouter and createStore
This commit is contained in:
commit
83c1e085a5
@ -44,10 +44,10 @@ const defaultTransition = <%=
|
||||
%>
|
||||
|
||||
async function createApp (ssrContext) {
|
||||
const router = createRouter()
|
||||
const router = createRouter(ssrContext)
|
||||
|
||||
<% if (store) { %>
|
||||
const store = createStore()
|
||||
const store = createStore(ssrContext)
|
||||
// Add this.$router into store actions/mutations
|
||||
store.$router = router
|
||||
<% } %>
|
||||
|
Loading…
Reference in New Issue
Block a user