fix: more resilient saved to avoid conflict. (no need to add the README main file when saveCacheNote)
This commit is contained in:
10
src/modules/note/cache/prepareNoteCache.ts
vendored
10
src/modules/note/cache/prepareNoteCache.ts
vendored
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user