Merge pull request #507 from agoalofalife/master

proposal for validation pages
This commit is contained in:
Sébastien Chopin 2017-04-05 18:35:24 +02:00 committed by GitHub
commit 1372d29fa3
2 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,7 @@ function render (to, from, next) {
if (typeof Component.options.validate !== 'function') return
isValid = Component.options.validate({
params: to.params || {},
query: to.query || {}
query: to.query || {}<%= (store ? ', store: ctx.store' : '') %>
})
})
if (!isValid) {

View File

@ -153,7 +153,7 @@ export default context => {
if (typeof Component.options.validate !== 'function') return
isValid = Component.options.validate({
params: context.route.params || {},
query: context.route.query || {}
query: context.route.query || {}<%= (store ? ', store: context.store' : '') %>
})
})
if (!isValid) {