Skip to content

Commit 186917d

Browse files
committed
fix for caplin#289
1 parent 95e4beb commit 186917d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ChangeLog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
0.6.5
2+
fix for #289, allow setting attributes to undefined value
3+
14
0.6.4
25
Code tidy
36
Updated dependencies

src/AttributeDefinitions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ export class AttributeDefinitions {
5959

6060
update(jsonObj: any, obj: any) {
6161
for (const attr of this.attributes) {
62-
const fromValue = jsonObj[attr.name];
63-
if (fromValue !== undefined) {
62+
if (jsonObj.hasOwnProperty(attr.name)) {
63+
const fromValue = jsonObj[attr.name];
6464
obj[attr.name] = fromValue;
6565
}
6666
}

0 commit comments

Comments
 (0)