mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-09 10:50:42 +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) => {
|
const handleMouseEvent = (e: MouseEvent, mouseIn: boolean) => {
|
||||||
let typeTarget = e.target! as SVGGraphicsElement;
|
let typeTarget = e.target! as SVGGraphicsElement;
|
||||||
let counter = 0;
|
let counter = 0;
|
||||||
while (!typeTarget.classList.contains("typicalc-type")
|
while (typeTarget.classList
|
||||||
|
&& !typeTarget.classList.contains("typicalc-type")
|
||||||
&& !typeTarget.classList.contains("typicalc-label")) {
|
&& !typeTarget.classList.contains("typicalc-label")) {
|
||||||
typeTarget = typeTarget.parentNode! as SVGGraphicsElement;
|
typeTarget = typeTarget.parentNode! as SVGGraphicsElement;
|
||||||
counter++;
|
counter++;
|
||||||
@ -382,6 +383,9 @@ class MathjaxProofTree extends MathjaxAdapter {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!typeTarget.classList) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let isType = typeTarget.classList.contains("typicalc-type");
|
let isType = typeTarget.classList.contains("typicalc-type");
|
||||||
let isLabel = typeTarget.classList.contains("typicalc-label");
|
let isLabel = typeTarget.classList.contains("typicalc-label");
|
||||||
if (mouseIn) {
|
if (mouseIn) {
|
||||||
|
Loading…
Reference in New Issue
Block a user