Skip to content

Commit 18e771c

Browse files
committed
fix get data and data deletion error
1 parent 57aa19f commit 18e771c

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

src/components/PodBrowser.vue

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ export default {
270270
this.deletionSuccess = true;
271271
this.showInfoIndex = null;
272272
await this.getItems(this.displayPath);
273-
this.urls = [...this.urls.filter((url) => url !== fileUrl)];
274-
this.separateUrls();
275-
this.renderKey += 1; // Force re-render
273+
// this.urls = [...this.urls.filter((url) => url !== fileUrl)];
274+
// this.separateUrls();
275+
// this.renderKey += 1; // Force re-render
276276
} else {
277277
this.deletionSuccess = false;
278278
}
@@ -329,7 +329,7 @@ export default {
329329
this.urls = [...urls];
330330
this.separateUrls();
331331
} catch (e) {
332-
// console.error("Could not fetch data info from the URL provided...");
332+
console.error("Could not fetch data info from the URL provided...");
333333
}
334334
},
335335
@@ -348,22 +348,18 @@ export default {
348348
* Sorts container URLs and resource URLs into different lists
349349
*/
350350
separateUrls() {
351-
this.containerUrls = this.urls.filter((url: string) => url.endsWith("/"));
352-
this.resourceUrls = this.urls.filter((url: string) => !url.endsWith("/"));
351+
this.containerUrls = [...this.urls.filter((url: string) => url.endsWith("/"))];
352+
this.resourceUrls = [...this.urls.filter((url: string) => !url.endsWith("/"))];
353353
if (
354-
this.currentLocation === this.selectedPodUrl() &&
355-
!this.urls.includes(this.selectedPodUrl())
354+
this.currentLocation === this.selectedPodUrl &&
355+
!this.urls.includes(this.selectedPodUrl)
356356
) {
357-
this.urls.push(this.selectedPodUrl());
358-
this.containerUrls.push(this.selectedPodUrl());
357+
this.urls.push(this.selectedPodUrl);
358+
this.containerUrls.push(this.selectedPodUrl);
359359
}
360-
this.urls = this.urls.sort((a: string, b: string) => a.length - b.length);
361-
this.container = this.urls.sort(
362-
(a: string, b: string) => a.length - b.length
363-
);
364-
this.resourceUrls = this.urls.sort(
365-
(a: string, b: string) => a.length - b.length
366-
);
360+
this.urls = [...this.urls.sort((a: string, b: string) => a.length - b.length)];
361+
this.container = [...this.urls.sort((a: string, b: string) => a.length - b.length)];
362+
this.resourceUrls = [...this.urls.sort((a: string, b: string) => a.length - b.length)];
367363
},
368364
369365
/*

0 commit comments

Comments
 (0)