Fix mobile crash when no storage

This commit is contained in:
ZXY101
2023-09-23 08:22:06 +02:00
parent c3c94a604c
commit 98a42a64c3

View File

@@ -29,10 +29,10 @@
draggedFiles = undefined;
}
let storageSpace = 'Loading...';
let storageSpace = '';
onMount(() => {
navigator.storage.estimate().then(({ usage, quota }) => {
navigator?.storage?.estimate().then(({ usage, quota }) => {
if (usage && quota) {
storageSpace = `Storage: ${formatBytes(usage)} / ${formatBytes(quota)}`;
}