fixes and cleanup
This commit is contained in:
@@ -59,8 +59,12 @@ async function toggleCollapse() {
|
||||
async function fetchDirectoryContent() {
|
||||
try {
|
||||
isLoading.value = true;
|
||||
// preload from cache
|
||||
content.value = await fs.listDir(props.dir, {cache: 'only-cache'});
|
||||
try {
|
||||
// preload from cache
|
||||
content.value = await fs.listDir(props.dir, {cache: 'only-cache'});
|
||||
} catch (err) {
|
||||
// ignore missing cache
|
||||
}
|
||||
// replace with network
|
||||
content.value = await fs.listDir(props.dir, {cache: 'use-network'});
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user