mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
Merge pull request #3019 from nikugogoi/dev
pull request for issue #3018
This commit is contained in:
commit
f57096e572
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user