@@ -34,12 +34,12 @@ export function useDraftBase<T extends DatabaseItem | MediaItem>(
3434 }
3535
3636 const fsPath = hostDb . getFileSystemPath ( item . id )
37- const githubFile = await git . fetchFile ( joinURL ( ghPathPrefix , fsPath ) , { cached : true } ) as GithubFile
37+ const remoteFile = await git . fetchFile ( joinURL ( ghPathPrefix , fsPath ) , { cached : true } ) as GithubFile
3838
3939 const draftItem : DraftItem < T > = {
4040 id : item . id ,
4141 fsPath,
42- githubFile ,
42+ remoteFile ,
4343 status : getDraftStatus ( item , original ) ,
4444 modified : item ,
4545 }
@@ -86,22 +86,22 @@ export function useDraftBase<T extends DatabaseItem | MediaItem>(
8686 fsPath : existingDraftItem . fsPath ,
8787 status : DraftStatus . Deleted ,
8888 original : existingDraftItem . original ,
89- githubFile : existingDraftItem . githubFile ,
89+ remoteFile : existingDraftItem . remoteFile ,
9090 }
9191
9292 list . value = list . value . map ( item => item . id === id ? deleteDraftItem ! : item ) as DraftItem < T > [ ]
9393 }
9494 }
9595 else {
9696 // TODO: check if gh file has been updated
97- const githubFile = await git . fetchFile ( joinURL ( 'content' , fsPath ) , { cached : true } ) as GithubFile
97+ const remoteFile = await git . fetchFile ( joinURL ( 'content' , fsPath ) , { cached : true } ) as GithubFile
9898
9999 deleteDraftItem = {
100100 id,
101101 fsPath,
102102 status : DraftStatus . Deleted ,
103103 original : originalDbItem ,
104- githubFile ,
104+ remoteFile ,
105105 }
106106
107107 list . value . push ( deleteDraftItem )
0 commit comments