From 916dfb13ac47b62cf79a8546f1543186b28db0f8 Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Mon, 30 Sep 2024 18:50:07 +0800 Subject: [PATCH] View: don't destroy book on close The book object is not created by the view class so it has no business destroying it. Fix bug caused by 1e952102bd1932c1b9e5ddb88b5b8f41a0190a68 where closing the footnote view destroys the book, when it should not be destroyed, being still displayed by another view --- view.js | 1 - 1 file changed, 1 deletion(-) diff --git a/view.js b/view.js index 9811559..e8d6cd1 100644 --- a/view.js +++ b/view.js @@ -175,7 +175,6 @@ export class View extends HTMLElement { close() { this.renderer?.destroy() this.renderer?.remove() - this.book?.destroy?.() this.#sectionProgress = null this.#tocProgress = null this.#pageProgress = null