From 30ea6032c92e1c3745dbb142ec30389996977d8d Mon Sep 17 00:00:00 2001 From: waltem01 Date: Tue, 9 Apr 2024 09:41:55 +0200 Subject: [PATCH] env var always defined --- Webserver/src/lib/client/matrix.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Webserver/src/lib/client/matrix.ts b/Webserver/src/lib/client/matrix.ts index 66fbb72..5d627c1 100644 --- a/Webserver/src/lib/client/matrix.ts +++ b/Webserver/src/lib/client/matrix.ts @@ -26,11 +26,11 @@ export interface MatrixCell { // in the project-wide .env file. This is intentional. The optional- // chaining operator will catch these errors. export function initializeMatrix(): Matrix { - const led_width = Number(env?.PUBLIC_LED_WIDTH ?? '64'); - const led_height = Number(env?.PUBLIC_LED_HEIGHT ?? '64'); + const led_width = Number(env.PUBLIC_LED_WIDTH ?? '64'); + const led_height = Number(env.PUBLIC_LED_HEIGHT ?? '64'); - const led_chain = Number(env?.PUBLIC_LED_CHAIN ?? '1'); - const led_parallel = Number(env?.PUBLIC_LED_PARALLEL ?? '1'); + const led_chain = Number(env.PUBLIC_LED_CHAIN ?? '1'); + const led_parallel = Number(env.PUBLIC_LED_PARALLEL ?? '1'); return { width: led_width * led_parallel,