mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Fix when tooltip changes before tooltipObject is created (#1845)
It can happen in TagWithTooltip.svelte when a tag is normalized beause of leading/trailing delimiter
This commit is contained in:
parent
890b28c1e8
commit
9d98c62d50
1 changed files with 5 additions and 3 deletions
|
@ -43,9 +43,11 @@
|
|||
let previousTooltip: string = tooltip;
|
||||
$: if (tooltip !== previousTooltip) {
|
||||
previousTooltip = tooltip;
|
||||
const element: HTMLElement = tooltipObject["_element"];
|
||||
tooltipObject.dispose();
|
||||
createTooltip(element);
|
||||
if (tooltipObject !== undefined) {
|
||||
const element: HTMLElement = tooltipObject["_element"];
|
||||
tooltipObject.dispose();
|
||||
createTooltip(element);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in a new issue