Commit da9b7c3
fix(tooltip): ensure valid node before removal to prevent errors
This commit fixes an issue where the `removeTooltip` function attempted
to remove a tooltip element from the DOM without verifying if it was a
valid child of `document.body`. The updated implementation adds a check
to ensure the tooltip exists and its parent node is `document.body`
before proceeding with the removal. This change prevents the
"Failed to execute removeChild on Node: parameter 1 is not of type Node."
error from being thrown, enhancing the robustness and reliability of tooltip removal.1 parent 9079d49 commit da9b7c3
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
| 58 | + | |
60 | 59 | | |
61 | 60 | | |
62 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | | - | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
0 commit comments