Fix: string values read from XML are not converted to the correct type before assignment

This commit is contained in:
Rossen Hristov
2016-12-21 14:13:00 +02:00
parent b0b3541c23
commit 3529346c23

View File

@ -117,13 +117,13 @@ export class Property<T extends ViewBase, U> implements PropertyDescriptor {
delete this[defaultValueKey]; delete this[defaultValueKey];
} }
} else { } else {
this[key] = value; this[key] = unboxedValue;
if (setNativeValue) { if (setNativeValue) {
if (!(defaultValueKey in this)) { if (!(defaultValueKey in this)) {
this[defaultValueKey] = this[native]; this[defaultValueKey] = this[native];
} }
this[native] = value; this[native] = unboxedValue;
} }
} }