fix: more resilient saved to avoid conflict. (no need to add the README main file when saveCacheNote)

This commit is contained in:
Julien Calixte
2024-10-27 12:07:32 +01:00
parent 42778ef889
commit ffa7c42021
3 changed files with 18 additions and 5 deletions

View File

@@ -33,10 +33,12 @@ export const prepareNoteCache = (sha: string, path?: string) => {
editedSha: params?.editedSha
}
store.addFile({
path: params?.path,
sha: params?.editedSha
})
if (params && params.path) {
store.addFile({
path: params.path,
sha: params.editedSha
})
}
await data.update(newNote)