Skip to content

Commit be92311

Browse files
committed
patch: fixed issue when null is interpreted as an object
1 parent a6a3288 commit be92311

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)