Ignore failure to store fs handles

This commit is contained in:
Dustin Brett
2022-08-09 20:10:43 -07:00
parent 6b86a6d7f9
commit f146800f0f

View File

@@ -149,14 +149,18 @@ export const addFileSystemHandle = async (
const db = await getKeyValStore();
db.put(
KEYVAL_STORE_NAME,
{
...(await getFileSystemHandles()),
[join(directory, handle.name)]: handle,
},
FS_HANDLES
);
try {
db.put(
KEYVAL_STORE_NAME,
{
...(await getFileSystemHandles()),
[join(directory, handle.name)]: handle,
},
FS_HANDLES
);
} catch {
// Ignore errors storing handle
}
};
export const removeFileSystemHandle = async (