Skip to content

Commit dd9e70f

Browse files
author
Vladimir Enchev
committed
more fixes
1 parent 3a80949 commit dd9e70f

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

apps/tests/xml-declaration/xml-declaration-tests.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ export function test_parse_ShouldParseBooleanPropertiesIgnoreCaseInverted() {
130130
TKUnit.assert(tf.editable === false, "Expected result: false; Actual result: " + tf.editable + "; type: " + typeof (tf.editable));
131131
};
132132

133-
export function test_parse_ShouldParsePlatofmrSpecificProperties() {
133+
export function test_parse_ShouldParsePlatformSpecificProperties() {
134134
var p = <page.Page>builder.parse("<Page><TextField ios:editable='False' android:editable='True' /></Page>");
135135
var tf = <textFieldModule.TextField>p.content;
136136

137-
if(platform.device.os === platform.platformNames.ios) {
138-
TKUnit.assert(tf.editable === true, "Expected result: true; Actual result: " + tf.editable + "; type: " + typeof (tf.editable));
137+
if (platform.device.os === platform.platformNames.ios) {
138+
TKUnit.assert(tf.editable === false, "Expected result: false; Actual result: " + tf.editable + "; type: " + typeof (tf.editable));
139139
} else {
140-
TKUnit.assert(tf.editable === false, "Expected result: false; Actual result: " + tf.editable + "; type: " + typeof (tf.editable));
140+
TKUnit.assert(tf.editable === true, "Expected result: true; Actual result: " + tf.editable + "; type: " + typeof (tf.editable));
141141
}
142142
};
143143

ui/builder/component-builder.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,14 @@ export function getComponentModule(elementName: string, namespace: string, attri
7777

7878
var attrValue = <string>attributes[attr];
7979

80-
if (attr.indexOf(":") !== -1){
81-
var platformName = attr.split(":")[0].trim();
82-
if(platformName.toLowerCase() !== platform.device.os.toLowerCase()) {
83-
continue;
84-
}
85-
}
80+
if (attr.indexOf(":") !== -1) {
81+
var platformName = attr.split(":")[0].trim();
82+
if (platformName.toLowerCase() === platform.device.os.toLowerCase()) {
83+
attr = attr.split(":")[1].trim();
84+
} else {
85+
continue;
86+
}
87+
}
8688

8789
if (attr.indexOf(".") !== -1) {
8890
var subObj = instance;

0 commit comments

Comments
 (0)