File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,11 @@ onMounted(async () => {
103103 if (! data ) {
104104 // Request draft sync via Preview API
105105 try {
106+ // Wait for draft:ready and then request sync to get the data back with 'draft:ready'
107+ socket .once (' draft:ready' , () => {
108+ socket .emit (' draft:requestSync' )
109+ })
110+
106111 // Request preview sync from Preview API
107112 await $fetch (' api/projects/preview/sync' , {
108113 baseURL: props .api ,
@@ -111,11 +116,6 @@ onMounted(async () => {
111116 token: props .previewToken ,
112117 },
113118 })
114-
115- // Wait for draft:ready and then request sync to get the data back with 'draft:ready'
116- socket .once (' draft:ready' , () => {
117- socket .emit (' draft:requestSync' )
118- })
119119 }
120120 catch (e : any ) { // eslint-disable-line @typescript-eslint/no-explicit-any
121121 clearSyncTimeout ()
You can’t perform that action at this time.
0 commit comments