mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-08 10:20:41 +00:00
Fix NPE in frontend
This commit is contained in:
parent
29d692c231
commit
540f95c0f8
@ -374,7 +374,8 @@ class MathjaxProofTree extends MathjaxAdapter {
|
||||
const handleMouseEvent = (e: MouseEvent, mouseIn: boolean) => {
|
||||
let typeTarget = e.target! as SVGGraphicsElement;
|
||||
let counter = 0;
|
||||
while (!typeTarget.classList.contains("typicalc-type")
|
||||
while (typeTarget.classList
|
||||
&& !typeTarget.classList.contains("typicalc-type")
|
||||
&& !typeTarget.classList.contains("typicalc-label")) {
|
||||
typeTarget = typeTarget.parentNode! as SVGGraphicsElement;
|
||||
counter++;
|
||||
@ -382,6 +383,9 @@ class MathjaxProofTree extends MathjaxAdapter {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!typeTarget.classList) {
|
||||
return;
|
||||
}
|
||||
let isType = typeTarget.classList.contains("typicalc-type");
|
||||
let isLabel = typeTarget.classList.contains("typicalc-label");
|
||||
if (mouseIn) {
|
||||
|
Loading…
Reference in New Issue
Block a user