From fe7b02beae8494d4de621b1ffa27c8e483783812 Mon Sep 17 00:00:00 2001 From: Ruthenic Date: Thu, 1 Dec 2022 00:24:19 -0500 Subject: [PATCH] fix to make sure we don't accidentally have `undefined` at the start of chapter text because `undefined + "whatever"` is `"undefinedwhatever"`. obviously. --- src/classes/Chapter.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/classes/Chapter.ts b/src/classes/Chapter.ts index f79957d..d482744 100644 --- a/src/classes/Chapter.ts +++ b/src/classes/Chapter.ts @@ -105,8 +105,7 @@ export default class Chapter { } async populateText() { - /*this.text = this.#document.querySelector("div.userstuff[role='article']")?.innerText.trim().replace(/Chapter Text\s+/, "") as string*/ - //"div.userstuff[role='article'] > p" + this.#text = ""; Array.from( this.#document.querySelectorAll( "div.userstuff[role='article'] > p",