mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 05:18:39 +08:00
Merge pull request #1185 from NativeScript/hhritov/do-refactoring-strict-mode
removed unneeded check and make it strict-mode compliant
This commit is contained in:
@ -127,6 +127,7 @@ export class Property implements definition.Property {
|
|||||||
if (propertyFromKey[this._key]) {
|
if (propertyFromKey[this._key]) {
|
||||||
throw new Error("Property " + name + " already registered for type " + ownerType + ".");
|
throw new Error("Property " + name + " already registered for type " + ownerType + ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
propertyFromKey[this._key] = this;
|
propertyFromKey[this._key] = this;
|
||||||
|
|
||||||
if (!metadata || !(metadata instanceof PropertyMetadata)) {
|
if (!metadata || !(metadata instanceof PropertyMetadata)) {
|
||||||
@ -135,15 +136,10 @@ export class Property implements definition.Property {
|
|||||||
|
|
||||||
this._name = name;
|
this._name = name;
|
||||||
this._ownerType = ownerType;
|
this._ownerType = ownerType;
|
||||||
|
|
||||||
this._metadata = metadata;
|
this._metadata = metadata;
|
||||||
if (!metadata.options) {
|
|
||||||
metadata.options = PropertyMetadataSettings.None;
|
|
||||||
}
|
|
||||||
|
|
||||||
// generate a unique numeric id for each property (faster lookup than a string key)
|
// generate a unique numeric id for each property (faster lookup than a string key)
|
||||||
this._id = propertyIdCounter++;
|
this._id = propertyIdCounter++;
|
||||||
|
|
||||||
this._valueConverter = valueConverter;
|
this._valueConverter = valueConverter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user