mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
pull request for issue #3018
This commit is contained in:
parent
392f108d76
commit
28dede9687
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user