From b6ac9f02028b084b06fbe81b046fb73e56681da7 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Wed, 26 Jan 2022 23:38:33 +0100 Subject: [PATCH] Use undefined instead of null, for those unusual cases where an unknown turn (!) is being looked up --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 46cd20a..4969e5b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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) {