Show More
@@ -179,7 +179,13 b' define([' | |||
|
179 | 179 | return Promise.resolve(view.render()).then(function() {return view;}); |
|
180 | 180 | }).catch(utils.reject("Couldn't create a view for model id '" + String(model.id) + "'", true)); |
|
181 | 181 | }); |
|
182 | model.views[utils.uuid()] = model.state_change; | |
|
182 | var id = utils.uuid(); | |
|
183 | model.views[id] = model.state_change; | |
|
184 | model.state_change.then(function(view) { | |
|
185 | view.on('remove', function() { | |
|
186 | delete view.model.views[id]; | |
|
187 | }, this); | |
|
188 | }); | |
|
183 | 189 | return model.state_change; |
|
184 | 190 | }; |
|
185 | 191 |
General Comments 0
You need to be logged in to leave comments.
Login now