repositories
/
e-mobility-charging-stations-simulator.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e61f0f6
)
refactor: remove isUndefined() leftover
author
Jérôme Benoit
<jerome.benoit@sap.com>
Fri, 29 Dec 2023 20:16:46 +0000
(21:16 +0100)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Fri, 29 Dec 2023 20:16:46 +0000
(21:16 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
ui/web/src/composables/Utils.ts
patch
|
blob
|
blame
|
history
diff --git
a/ui/web/src/composables/Utils.ts
b/ui/web/src/composables/Utils.ts
index ea51bc23121a2b47d4813a5098843564cae31c91..7f070e49a8aa7fde7f8e268f6369172494c8e13c 100644
(file)
--- 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 = <T>(value: T | undefined, isValue: T): T => {
- if (
isUndefined(value) === true
) return isValue
+ if (
value === undefined
) return isValue
return value as T
}