Skip to content

Commit

Permalink
Leave empty note after refresh, fixes #18
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jul 14, 2024
1 parent 4e8eaad commit 8788b18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ async function refresh({ selectedFolderURL, items, setItems, setIsLoading }) {
pathObject.blocks = previousState.blocks;
}
}
setItems(pathObjects);
const unsaved = items.filter((item) => !item.path);
setItems([...unsaved, ...pathObjects]);
} catch (error) {
// eslint-disable-next-line no-alert
window.alert(error);
Expand Down

0 comments on commit 8788b18

Please sign in to comment.