You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/05/23 01:04:24 UTC
[05/15] git commit: [flex-asjs] [refs/heads/develop] - fix bug in
binding
fix bug in binding
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/150811ae
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/150811ae
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/150811ae
Branch: refs/heads/develop
Commit: 150811aedef7a155b7ac99b8412764232e22aa86
Parents: cb82c4f
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 15:25:21 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:11 2015 -0700
----------------------------------------------------------------------
.../js/src/org/apache/flex/binding/ViewBaseDataBinding.js | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/150811ae/frameworks/projects/Binding/js/src/org/apache/flex/binding/ViewBaseDataBinding.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/js/src/org/apache/flex/binding/ViewBaseDataBinding.js b/frameworks/projects/Binding/js/src/org/apache/flex/binding/ViewBaseDataBinding.js
index b5428a6..593fd23 100644
--- a/frameworks/projects/Binding/js/src/org/apache/flex/binding/ViewBaseDataBinding.js
+++ b/frameworks/projects/Binding/js/src/org/apache/flex/binding/ViewBaseDataBinding.js
@@ -222,8 +222,12 @@ org_apache_flex_binding_ViewBaseDataBinding.prototype.setupWatchers =
for (i = 0; i < n; i++)
{
var watcher = watchers[i];
- if (watcher.bindings.indexOf(index) != -1)
- {
+ var isValidWatcher = false;
+ if (typeof(watcher.bindings) === 'number')
+ isValidWatcher = (watcher.bindings == index);
+ else
+ isValidWatcher = (watcher.bindings.indexOf(index) != -1);
+ if (isValidWatcher) {
var type = watcher.type;
switch (type)
{
@@ -248,7 +252,7 @@ org_apache_flex_binding_ViewBaseDataBinding.prototype.setupWatchers =
}
if (watcher.children)
{
- this.setupWatchers(gb, index, watcher.children,
+ this.setupWatchers(gb, index, watcher.children.watchers,
watcher.watcher);
}
}