diff options
author | Jose Antonio Marquez | 2012-02-16 11:30:33 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-16 11:30:33 -0800 |
commit | 9fe5d98bf469036c856e28d71ad4160d630b4af4 (patch) | |
tree | 930a334bcda0c26ca02eaa33a1506d147e8691e1 /node_modules/montage/data | |
parent | 89b5e793ea88ef235b54b6e1d1c379698d3e612b (diff) | |
parent | 71619045b692015b0889a4f5c381c1dee9c056cd (diff) | |
download | ninja-9fe5d98bf469036c856e28d71ad4160d630b4af4.tar.gz |
Merge branch 'refs/heads/NinjaInternal' into Color
Diffstat (limited to 'node_modules/montage/data')
-rwxr-xr-x | node_modules/montage/data/context.js | 5 |
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 | } |