Skip to content

Commit b5d8ad6

Browse files
authored
Merge pull request #62 from cmolisee/60
patch: fixed issue when null is interpreted as an object
2 parents a6a3288 + be92311 commit b5d8ad6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/JsonUtils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ export function getDataAsFormattedJson(object: any) {
77
}
88

99
export function getDataType(object: any) {
10-
if (typeof object === 'object') {
10+
if (object === null) {
11+
return 'null';
12+
} else if (typeof object === 'object') {
1113
return Array.isArray(object) ? 'array' : 'object';
1214
} else if (
1315
object === 'true' ||

0 commit comments

Comments
 (0)