Yield when search finishes

This allows distinguishing between finished and aborted (with `Generator
.prototype.return`) search
This commit is contained in:
John Factotum
2023-05-13 07:18:22 +08:00
parent 5da3be5200
commit 1396bd2b89
+1
View File
@@ -269,6 +269,7 @@ export class View {
label: this.#tocProgress.getProgress(result.index)?.label ?? '', label: this.#tocProgress.getProgress(result.index)?.label ?? '',
subitems: result.subitems, subitems: result.subitems,
} : result } : result
yield 'done'
} }
destroy() { destroy() {
this.book.destroy?.() this.book.destroy?.()