Use undefined instead of null, for those unusual cases where an unknown turn (!) is being looked up

This commit is contained in:
Tony Garnock-Jones 2022-01-26 23:38:33 +01:00
parent 5cbee822d2
commit b6ac9f0202
1 changed files with 3 additions and 3 deletions

View File

@ -356,8 +356,8 @@ class Renderer {
}
const cause = (causingTurnId !== null)
? this.turnMap.get(fromJS(causingTurnId))!
: null;
if (cause !== null) {
: void 0;
if (cause !== void 0) {
this.connect(cause.point, new P.Point(swimlane.midX, this.ypos));
}
@ -371,7 +371,7 @@ class Renderer {
let entryClass: string;
let label: string;
let tooltip: string = `Turn ${stringify(turn.id)} in ${swimlane.label}`;
if (cause !== null) {
if (cause !== void 0) {
tooltip += `\n caused by ${stringify(causingTurnId!)} in ${cause.swimlane.label}`;
}
if (a._variant !== "dequeue" && a._variant !== "dequeueInternal" && triggerEvent !== null) {