mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 14:38:12 +08:00
Ban the null literal via ESLint and replace existing usages with undefined or truthiness checks (#4401)
This commit is contained in:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user