mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-21 00:21:35 +03:00
Fix dev problem when hot reloading
- must check if element is still connected before manipulating element
This commit is contained in:
parent
5d927abfcc
commit
8a83e01ce0
@ -47,7 +47,7 @@ export function tooltip(node: HTMLElement, optsOrString: ToolTipOptions | string
|
||||
}
|
||||
|
||||
function show() {
|
||||
if (!text) return;
|
||||
if (!text || !node.isConnected) return;
|
||||
tooltip = document.createElement('div') as HTMLDivElement;
|
||||
// TODO: Can we co-locate tooltip.js & tooltip.postcss?
|
||||
tooltip.classList.add('tooltip', 'text-base-11'); // see tooltip.postcss
|
||||
|
Loading…
Reference in New Issue
Block a user