handle test for statics differently
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ca5aedcb Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ca5aedcb Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ca5aedcb Branch: refs/heads/develop Commit: ca5aedcbf5de98c93f289c756d8a84c0a11dcdb2 Parents: d9ebd92 Author: Alex Harui <aha...@apache.org> Authored: Fri Apr 3 09:37:41 2015 -0700 Committer: Alex Harui <aha...@apache.org> Committed: Fri Apr 3 09:37:41 2015 -0700 ---------------------------------------------------------------------- .../FlexJS/src/org/apache/flex/binding/ConstantBinding.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ca5aedcb/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js b/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js index 2c56451..8e60fb1 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js @@ -46,13 +46,10 @@ Object.defineProperties(org_apache_flex_binding_ConstantBinding.prototype, { org_apache_flex_utils_Language.superSetter(org_apache_flex_binding_ConstantBinding, this, 'strand', value); var val; - try { + if (this.sourcePropertyName in this.source) { val = this.source[this.sourcePropertyName]; - } catch (e) { - try { - val = this.source.constructor[this.sourcePropertyName]; - } catch (e2) { - } + } else if (this.sourcePropertyName in this.source.constructor) { + val = this.source.constructor[this.sourcePropertyName]; } this.destination[this.destinationPropertyName] = val; }