Created
May 22, 2019 10:10
-
-
Save shts/f2925b3394a3be79ac6d2293c7421fea to your computer and use it in GitHub Desktop.
nuxtServerInit が呼ばれるとき store._actions.nuxtServerInit 入っている値
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// nuxt -v | |
// @nuxt/cli v2.6.2 | |
store._actions.nuxtServerInit(function wrappedActionHandler (payload, cb) { | |
var res = handler.call(store, { | |
dispatch: local.dispatch, | |
commit: local.commit, | |
getters: local.getters, | |
state: local.state, | |
rootGetters: store.getters, | |
rootState: store.state | |
}, payload, cb); | |
if (!isPromise(res)) { | |
res = Promise.resolve(res); | |
} | |
if (store._devtoolHook) { | |
return res.catch(function (err) { | |
store._devtoolHook.emit('vuex:error', err); | |
throw err | |
}) | |
} else { | |
return res | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment