mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 22:52:12 -03:00
feat: Update restoreSelectedFolder to ensure activeFolder is a string before assignment and reset selectedPath if not
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
@@ -754,12 +754,13 @@ export class SidebarManager {
|
|||||||
|
|
||||||
restoreSelectedFolder() {
|
restoreSelectedFolder() {
|
||||||
const activeFolder = getStorageItem(`${this.pageType}_activeFolder`);
|
const activeFolder = getStorageItem(`${this.pageType}_activeFolder`);
|
||||||
if (activeFolder) {
|
if (activeFolder && typeof activeFolder === 'string') {
|
||||||
this.selectedPath = activeFolder;
|
this.selectedPath = activeFolder;
|
||||||
this.updateTreeSelection();
|
this.updateTreeSelection();
|
||||||
this.updateBreadcrumbs();
|
this.updateBreadcrumbs();
|
||||||
this.updateSidebarHeader();
|
this.updateSidebarHeader();
|
||||||
} else {
|
} else {
|
||||||
|
this.selectedPath = '';
|
||||||
this.updateSidebarHeader();
|
this.updateSidebarHeader();
|
||||||
this.updateBreadcrumbs(); // Always update breadcrumbs
|
this.updateBreadcrumbs(); // Always update breadcrumbs
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user