Skip to content

Commit 0c7bfd6

Browse files
committed
Fixes issue where empty strings were serialized as null values
1 parent 8a21545 commit 0c7bfd6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@highmobility/auto-api-javascript",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"description": "Auto API for JavaScript - the parsing library for the Auto API vehicle data model",
55
"main": "lib/index.js",
66
"module": "es/index.js",

src/values/StringValue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ export class StringValue extends Value<string> implements NamedEntity {
4040
}
4141

4242
public valueOf() {
43-
return this._value || null;
43+
return this._value === undefined ? null : this._value;
4444
}
4545
}

0 commit comments

Comments
 (0)