From f1c1a02877d9423355d0506d440c7a5736782de3 Mon Sep 17 00:00:00 2001 From: BordedDev <> Date: Fri, 17 Jan 2025 00:05:01 +0100 Subject: [PATCH] Simplified undefined check --- reviews/BordedDev/sudoku.modified.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/reviews/BordedDev/sudoku.modified.js b/reviews/BordedDev/sudoku.modified.js index 73ae5a6..5d3407b 100644 --- a/reviews/BordedDev/sudoku.modified.js +++ b/reviews/BordedDev/sudoku.modified.js @@ -29,9 +29,7 @@ class EventHandler { if (this.suppresEvents) return [] this.eventCount++ const returnValue = this.events[event].listeners.map((listener) => { - const returnValue = listener(data) - if (returnValue == undefined) return null - return returnValue + return listener(data) ?? null }) this.events[event].callCount++ if (this.debugEvents) {