pull request for issue #3018

This commit is contained in:
Nabarun Gogoi 2018-03-14 15:33:17 +05:30
parent 392f108d76
commit 28dede9687
2 changed files with 2 additions and 10 deletions

View File

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

View File

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