Fix mobile crash when no storage
This commit is contained in:
@@ -29,10 +29,10 @@
|
|||||||
draggedFiles = undefined;
|
draggedFiles = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
let storageSpace = 'Loading...';
|
let storageSpace = '';
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
navigator.storage.estimate().then(({ usage, quota }) => {
|
navigator?.storage?.estimate().then(({ usage, quota }) => {
|
||||||
if (usage && quota) {
|
if (usage && quota) {
|
||||||
storageSpace = `Storage: ${formatBytes(usage)} / ${formatBytes(quota)}`;
|
storageSpace = `Storage: ${formatBytes(usage)} / ${formatBytes(quota)}`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user