Fixed getting object properties too many times.

This commit is contained in:
Nedyalko Nikolov
2015-12-16 11:14:16 +02:00
parent 04b13beb04
commit 5e440ab924
2 changed files with 32 additions and 2 deletions

View File

@@ -255,7 +255,8 @@ export class Binding {
currentObjectChanged = true;
}
result.push({ instance: currentObject, property: objProp });
if (!currentObjectChanged) {
// do not need to dive into last object property getter on binding stage will handle it
if (!currentObjectChanged && (i < propsArrayLength - 1)) {
currentObject = currentObject ? currentObject[propsArray[i]] : null;
}
currentObjectChanged = false;