Skip to content

Commit

Permalink
[TIMOB-24817] Fix combining of properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Mathews committed Apr 30, 2018
1 parent e2635c7 commit 4bfcb41
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private DataItem bindProxiesAndProperties(KrollDict properties, boolean isRootTe
{
Object proxy = null;
String id = null;
Object props = null;
KrollDict props = null;
DataItem item = null;
if (properties.containsKey(TiC.PROPERTY_TI_PROXY)) {
proxy = properties.get(TiC.PROPERTY_TI_PROXY);
Expand Down Expand Up @@ -167,11 +167,17 @@ private DataItem bindProxiesAndProperties(KrollDict properties, boolean isRootTe
}

if (properties.containsKey(TiC.PROPERTY_PROPERTIES)) {
props = properties.get(TiC.PROPERTY_PROPERTIES);
KrollDict templateProperties = properties.getKrollDict(TiC.PROPERTY_PROPERTIES);
if (templateProperties != null) {
if (props != null) {
props.putAll(templateProperties);
} else {
props = templateProperties;
}
}
}

if (props instanceof HashMap) {
item.setDefaultProperties(new KrollDict((HashMap) props));
if (props != null) {
item.setDefaultProperties(props);
}

return item;
Expand Down

0 comments on commit 4bfcb41

Please sign in to comment.