diff options
author | Valerio Virgillito | 2012-02-16 10:54:48 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-16 10:54:48 -0800 |
commit | d52aca45e0357b5597e13d9b74998abb75fabea5 (patch) | |
tree | ffd4a0c060b00611953b7e3ed0b3955bf02ac6e7 /node_modules/montage/data | |
parent | d366c0bd1af6471511217ed574083e15059519b5 (diff) | |
download | ninja-d52aca45e0357b5597e13d9b74998abb75fabea5.tar.gz |
integrating the latest montage fixes for v0.6 into master
Signed-off-by: Valerio Virgillito <valerio@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 | } |