Skip to content

Commit 2b595e0

Browse files
committed
bugfix: deleting empty folders not possible
1 parent 68d7468 commit 2b595e0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/client/main/gui/Accordion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ export class AccordionPanel {
758758

759759
getChildElements(folder: AccordionElement): AccordionElement[] {
760760
let path = folder.path.slice(0).concat(folder.name).join("/");
761-
return this.elements.filter((element) => element.path.join("/").startsWith(path));
761+
return this.elements.filter((element) => (element.path.join("/") + "/").startsWith(path + "/"));
762762
}
763763

764764
pathStartsWith(path: string[], pathStart: string[]){

src/client/main/gui/ProjectExplorer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export class ProjectExplorer {
238238
that.main.networkManager.sendUpdates();
239239

240240
// if user owns database: rename it, too
241-
if(workspace.database.owner_id == workspace.owner_id){
241+
if(workspace.database?.owner_id == workspace.owner_id){
242242
workspace.database.name = newName;
243243
that.main.networkManager.setNameAndPublishedTo(workspace.id, newName, workspace.database.published_to, workspace.database.description, () => {})
244244
}

0 commit comments

Comments
 (0)