diff options
Diffstat (limited to 'js/controllers/objects-controller.js')
-rw-r--r-- | js/controllers/objects-controller.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/js/controllers/objects-controller.js b/js/controllers/objects-controller.js index 3e35ef5f..6557c14e 100644 --- a/js/controllers/objects-controller.js +++ b/js/controllers/objects-controller.js | |||
@@ -58,7 +58,15 @@ var objectsController = exports.ObjectsController = Montage.create(Montage, { | |||
58 | value: function(bindingArgs) { | 58 | value: function(bindingArgs) { |
59 | if(!bindingArgs.sourceObject || !bindingArgs.sourceObjectPropertyPath || !bindingArgs) { return; } | 59 | if(!bindingArgs.sourceObject || !bindingArgs.sourceObjectPropertyPath || !bindingArgs) { return; } |
60 | 60 | ||
61 | Object.defineBinding(bindingArgs.sourceObject, bindingArgs.sourceObjectPropertyPath, bindingArgs); | 61 | var sourceObject = bindingArgs.sourceObject, |
62 | sourcePath = bindingArgs.sourceObjectPropertyPath, | ||
63 | sourceDescriptor = sourceObject._bindingDescriptors; | ||
64 | |||
65 | if(sourceDescriptor && sourceDescriptor[sourcePath]) { | ||
66 | this.removeBinding(bindingArgs); | ||
67 | } | ||
68 | |||
69 | Object.defineBinding(sourceObject, sourcePath, bindingArgs); | ||
62 | this.currentObjectBindings = this.getObjectBindings(bindingArgs.sourceObject); | 70 | this.currentObjectBindings = this.getObjectBindings(bindingArgs.sourceObject); |
63 | } | 71 | } |
64 | }, | 72 | }, |