From: Jérôme Benoit Date: Fri, 29 Dec 2023 20:16:46 +0000 (+0100) Subject: refactor: remove isUndefined() leftover X-Git-Tag: v1.2.31~14 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=194b6bf30eaffc3c6c07b244b1edea26c6bb77ed;p=e-mobility-charging-stations-simulator.git refactor: remove isUndefined() leftover Signed-off-by: Jérôme Benoit --- diff --git a/ui/web/src/composables/Utils.ts b/ui/web/src/composables/Utils.ts index ea51bc23..7f070e49 100644 --- a/ui/web/src/composables/Utils.ts +++ b/ui/web/src/composables/Utils.ts @@ -1,9 +1,5 @@ -const isUndefined = (value: unknown): boolean => { - return typeof value === 'undefined' -} - export const ifUndefined = (value: T | undefined, isValue: T): T => { - if (isUndefined(value) === true) return isValue + if (value === undefined) return isValue return value as T }