mirror of
https://github.com/decaf-dev/obsidian-vault-explorer.git
synced 2026-07-22 10:10:31 +00:00
fix: keep original isFavorite value when file is renamed
This commit is contained in:
parent
9e396dcc3d
commit
ddadc93576
1 changed files with 3 additions and 2 deletions
|
|
@ -118,8 +118,9 @@ class FavoritesStore {
|
|||
});
|
||||
|
||||
this.store.update((store) => {
|
||||
if (store.get(oldPath)) {
|
||||
store.set(newPath, true);
|
||||
const isFavorite = store.get(oldPath);
|
||||
if (isFavorite !== undefined) {
|
||||
store.set(newPath, isFavorite);
|
||||
store.delete(oldPath);
|
||||
this.debounceSave(store);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue