Commit 540f95c0 authored by Arne Keller's avatar Arne Keller
Browse files

Fix NPE in frontend

parent 29d692c2
Pipeline #165615 failed with stages
in 17 seconds
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment