Skip to content

Commit e50f4ea

Browse files
Kent Delanteleftybournes
authored andcommitted
fix(files): uri encode node source
Signed-off-by: Kent Delante <kent@delante.me> Node sources that aren't url-encoded are compared against their url-encoded counterparts. Ensure that both are url-encoded so that a fair comparison is made. This fixes an issue with files lists still showing a .md file in the list after deleting it in the editor.
1 parent 26df031 commit e50f4ea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/files/src/store/files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export const useFilesStore = defineStore('files', () => {
140140
*/
141141
function deleteNodes(nodes: INode[]) {
142142
const entries = Object.entries(files.value)
143-
.filter(([, node]) => !nodes.some((n) => n.source === node.source))
143+
.filter(([, node]) => !nodes.some((n) => n.source === encodeURI(node.source)))
144144
files.value = Object.fromEntries(entries)
145145
}
146146

0 commit comments

Comments
 (0)