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