Skip to content

Commit

Permalink
canOPFS check
Browse files Browse the repository at this point in the history
  • Loading branch information
a-crowell committed Aug 21, 2024
1 parent 8da8958 commit 14790b0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions fission/src/mirabuf/MirabufLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,13 @@ class MirabufCachingService {
* Removes all Mirabuf files from the caching services. Mostly for debugging purposes.
*/
public static async RemoveAll() {
for await (const key of robotFolderHandle.keys()) {
robotFolderHandle.removeEntry(key)
}
for await (const key of fieldFolderHandle.keys()) {
fieldFolderHandle.removeEntry(key)
if (canOPFS) {
for await (const key of robotFolderHandle.keys()) {
robotFolderHandle.removeEntry(key)
}
for await (const key of fieldFolderHandle.keys()) {
fieldFolderHandle.removeEntry(key)
}
}

window.localStorage.setItem(robotsDirName, "{}")
Expand Down

0 comments on commit 14790b0

Please sign in to comment.