File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,6 @@ export function createApp() {
5555 const data = initData ( router . route )
5656 app . provide ( dataSymbol , data )
5757
58- if ( inBrowser ) {
59- // dynamically update head tags
60- useUpdateHead ( router . route , data . site )
61- }
62-
6358 // install global components
6459 app . component ( 'Content' , Content )
6560 app . component ( 'ClientOnly' , ClientOnly )
@@ -85,7 +80,7 @@ export function createApp() {
8580 } )
8681 }
8782
88- return { app, router }
83+ return { app, router, data }
8984}
9085
9186function newApp ( ) : App {
@@ -145,10 +140,12 @@ function shouldHotReload(payload: any): boolean {
145140}
146141
147142if ( inBrowser ) {
148- const { app, router } = createApp ( )
143+ const { app, router, data } = createApp ( )
149144
150145 // wait until page component is fetched before mounting
151146 router . go ( ) . then ( ( ) => {
147+ // dynamically update head tags
148+ useUpdateHead ( router . route , data . site )
152149 app . mount ( '#app' )
153150 } )
154151}
You can’t perform that action at this time.
0 commit comments