Merge pull request #921 from SAP/combined-prs-branch
[e-mobility-charging-stations-simulator.git] / ui / web / src / composables / Utils.ts
index 4ff26db62f0580a28025f56c2007e83f828ac6b2..7f070e49a8aa7fde7f8e268f6369172494c8e13c 100644 (file)
@@ -1,14 +1,10 @@
-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
 }
 
 // const isIterable = <T>(obj: T): boolean => {
-//   if (obj === null || obj === undefined) {
+//   if (obj == null) {
 //     return false
 //   }
 //   return typeof (obj as unknown as Iterable<T>)[Symbol.iterator] === 'function'