fix(library): globalThis setTimeout in modal (test env has no window)
This commit is contained in:
parent
83bf8323e2
commit
eb6b3d25d0
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ export class CandidatePickerModal extends FuzzySuggestModal<PickerItem> {
|
||||||
// Obsidian's selectSuggestion() calls close() BEFORE onChooseItem(), so settling here
|
// Obsidian's selectSuggestion() calls close() BEFORE onChooseItem(), so settling here
|
||||||
// synchronously would discard a real choice. Defer one tick: a choice made in the same
|
// synchronously would discard a real choice. Defer one tick: a choice made in the same
|
||||||
// tick settles first and this becomes a no-op; a genuine dismissal settles as skip.
|
// tick settles first and this becomes a no-op; a genuine dismissal settles as skip.
|
||||||
window.setTimeout(() => this.settle(null), 0);
|
setTimeout(() => this.settle(null), 0);
|
||||||
this.contentEl.empty();
|
this.contentEl.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue