From 9d7f1a2d71565d1aef0165d7fdde6e336f76ab59 Mon Sep 17 00:00:00 2001 From: dousha Date: Sat, 15 Feb 2025 01:52:07 +0800 Subject: [PATCH] Allow removing weak branches even if it's hoisted --- src/becca/entities/bbranch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/becca/entities/bbranch.ts b/src/becca/entities/bbranch.ts index 0160ef61b..018f8f2f7 100644 --- a/src/becca/entities/bbranch.ts +++ b/src/becca/entities/bbranch.ts @@ -159,7 +159,7 @@ class BBranch extends AbstractBeccaEntity { } } - if (this.noteId === "root" || this.noteId === cls.getHoistedNoteId()) { + if ((this.noteId === "root" || this.noteId === cls.getHoistedNoteId()) && !this.isWeak) { throw new Error("Can't delete root or hoisted branch/note"); }