aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/data
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-20 11:14:44 -0800
committerNivesh Rajbhandari2012-02-20 11:14:44 -0800
commitabf78e2d7a97d295ce5a1c425fd359d47379137e (patch)
treed08c91bd2aef31e6325e0b499b2ffc390018bec6 /node_modules/montage/data
parente80a79bff57fecf3aa9b869d8ed2de5fd815287c (diff)
parente23708721a71ca4c71365f5f8e8ac7d6113926db (diff)
downloadninja-abf78e2d7a97d295ce5a1c425fd359d47379137e.tar.gz
Merge branch 'refs/heads/ninja-internal' into ToolFixes
Diffstat (limited to 'node_modules/montage/data')
-rwxr-xr-xnode_modules/montage/data/context.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/node_modules/montage/data/context.js b/node_modules/montage/data/context.js
index 694198e3..ca992ff0 100755
--- a/node_modules/montage/data/context.js
+++ b/node_modules/montage/data/context.js
@@ -148,10 +148,11 @@ var Context = exports.Context = Montage.create(Store, /** @lends module:montage/
148 if (instance.context === null) { 148 if (instance.context === null) {
149 instance.context = this; 149 instance.context = this;
150 this._inserted.add(instance); 150 this._inserted.add(instance);
151 var self = this;
151 return this.initializeObject(instance, this).then(function(instance) { 152 return this.initializeObject(instance, this).then(function(instance) {
152 this._objectMap.set(instance.objectId, instance); 153 self._objectMap.set(instance.objectId, instance);
153 return Promise.ref(instance); 154 return Promise.ref(instance);
154 }.bind(this)); 155 });
155 } else if (instance.context !== this) { 156 } else if (instance.context !== this) {
156 throw Exception.initWithMessageTargetAndMethod("This instance is already inserted in another context.", this, "insert"); 157 throw Exception.initWithMessageTargetAndMethod("This instance is already inserted in another context.", this, "insert");
157 } 158 }