diff options
author | Armen Kesablyan | 2012-02-15 14:28:21 -0800 |
---|---|---|
committer | Armen Kesablyan | 2012-02-15 14:28:21 -0800 |
commit | 2a5484af59544a9dfdda854d707455f08a24fe69 (patch) | |
tree | 31055dd7a5548ab307a094d02be7012c77eeb4b9 /node_modules/montage/data | |
parent | bb4da39a73cbd6fbe83f3b7c9ed5ae60fe58dd6b (diff) | |
download | ninja-2a5484af59544a9dfdda854d707455f08a24fe69.tar.gz |
Latest Montage Updates 0.6 Fixes
Signed-off-by: Armen Kesablyan <armen@motorola.com>
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 | } |