From 1396bd2b899f5d7c60d5e14a296ac1daed6db7f3 Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Sat, 13 May 2023 07:18:22 +0800 Subject: [PATCH] Yield when search finishes This allows distinguishing between finished and aborted (with `Generator .prototype.return`) search --- view.js | 1 + 1 file changed, 1 insertion(+) diff --git a/view.js b/view.js index b84e09f..d59c2f4 100644 --- a/view.js +++ b/view.js @@ -269,6 +269,7 @@ export class View { label: this.#tocProgress.getProgress(result.index)?.label ?? '', subitems: result.subitems, } : result + yield 'done' } destroy() { this.book.destroy?.()