mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
Fix indexeddb file system readdir to use a range
This commit is contained in:
@@ -134,12 +134,7 @@ export function ProjectProvider({ children }: { children: ComponentChildren }) {
|
||||
if (project) {
|
||||
const projectRoot = getProjectRoot(project)
|
||||
const entries = await SpyglassClient.FS.readdir(projectRoot)
|
||||
await Promise.all(entries.flatMap(async e => {
|
||||
if (e.name.startsWith(projectRoot)) {
|
||||
return [await SpyglassClient.FS.unlink(e.name)]
|
||||
}
|
||||
return []
|
||||
}))
|
||||
await Promise.all(entries.map(async e => SpyglassClient.FS.unlink(e.name)))
|
||||
}
|
||||
changeProjects(projects.filter(p => p.name !== name))
|
||||
setOpenProject(undefined)
|
||||
|
||||
Reference in New Issue
Block a user