Ban the null literal via ESLint and replace existing usages with undefined or truthiness checks (#4401)

This commit is contained in:
Keavon Chambers
2026-08-03 23:47:29 -07:00
committed by GitHub
parent 79136c95be
commit 049b9dbc4d
4 changed files with 17 additions and 11 deletions
+1 -1
View File
@@ -353,7 +353,7 @@ function targetIsTextField(target: EventTarget | HTMLElement | undefined): boole
function potentiallyRestoreCanvasFocus(e: Event) {
const appElement = window.document.querySelector("[data-app-container]");
const app = appElement instanceof HTMLElement ? appElement : null;
const app = appElement instanceof HTMLElement ? appElement : undefined;
const newInCanvasArea =
(e.target instanceof Element && e.target.closest("[data-viewport], [data-viewport-container], [data-graph]")) instanceof Element &&