fix(vue-renderer): call render:resourcesLoaded hook before createRenderer (#6223)

fixes #5960
This commit is contained in:
Xin Du (Clark) 2019-08-12 21:55:21 +01:00 committed by Pooya Parsa
parent c58da7e832
commit 35ba65562f

View File

@ -128,13 +128,13 @@ export default class VueRenderer {
// Load templates
await this.loadTemplates()
await this.serverContext.nuxt.callHook('render:resourcesLoaded', this.serverContext.resources)
// Detect if any resource updated
if (updated.length > 0) {
// Create new renderer
this.createRenderer()
}
return this.serverContext.nuxt.callHook('render:resourcesLoaded', this.serverContext.resources)
}
async loadTemplates () {