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:
684bad5
)
Check for null or undefined in isEmptyObject()
author
Jérôme Benoit
<jerome.benoit@sap.com>
Thu, 27 Oct 2022 19:46:26 +0000
(21:46 +0200)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Thu, 27 Oct 2022 19:46:26 +0000
(21:46 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/utils/Utils.ts
patch
|
blob
|
blame
|
history
diff --git
a/src/utils/Utils.ts
b/src/utils/Utils.ts
index f62319983507e9dbc038b7032cd8275da7d080b7..8826f702a142ad997cd97ffc89442c6ba6829d23 100644
(file)
--- a/
src/utils/Utils.ts
+++ b/
src/utils/Utils.ts
@@
-197,6
+197,9
@@
export default class Utils {
}
public static isEmptyObject(obj: object): boolean {
+ if (Utils.isNullOrUndefined(obj)) {
+ return false;
+ }
// Iterates over the keys of an object, if
// any exist, return false.
for (const _ in obj) {