Merge pull request #3019 from nikugogoi/dev

pull request for issue #3018
This commit is contained in:
Sébastien Chopin 2018-03-19 19:15:36 +01:00 committed by GitHub
commit f57096e572
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 10 deletions

View File

@ -270,11 +270,7 @@ async function render (to, from, next) {
Components.forEach(Component => { Components.forEach(Component => {
if (!isValid) return if (!isValid) return
if (typeof Component.options.validate !== 'function') return if (typeof Component.options.validate !== 'function') return
isValid = Component.options.validate({ isValid = Component.options.validate(app.context)
params: to.params || {},
query : to.query || {},
<% if(store) { %>store<% } %>
})
}) })
// ...If .validate() returned false // ...If .validate() returned false
if (!isValid) { if (!isValid) {

View File

@ -156,11 +156,7 @@ export default async ssrContext => {
Components.forEach((Component) => { Components.forEach((Component) => {
if (!isValid) return if (!isValid) return
if (typeof Component.options.validate !== 'function') return if (typeof Component.options.validate !== 'function') return
isValid = Component.options.validate({ isValid = Component.options.validate(app.context)
params: app.context.route.params || {},
query: app.context.route.query || {},
<%= (store ? 'store' : '') %>
})
}) })
// ...If .validate() returned false // ...If .validate() returned false
if (!isValid) { if (!isValid) {