proper party unsubscribe callbacking

This commit is contained in:
Tyler Renelle
2013-02-11 19:31:01 -05:00
parent 44eb3f1271
commit baa149b6ba
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -52,9 +52,9 @@ get '/', (page, model, next) ->
character.updateUser(batch)
batch.commit()
browser.restoreRefs model
party.partySubscribe model, -> page.render()
party.partySubscribe model, ->
browser.restoreRefs model
page.render()
# ========== CONTROLLER FUNCTIONS ==========
+1 -1
View File
@@ -8,8 +8,8 @@ membersQ = null
partyUnsubscribe = (model, cb) ->
if window?
subs = model._subs()
subs.concat cb if cb?
model.unsubscribe.apply(model, subs)
cb() if cb?
module.exports.partySubscribe = partySubscribe = (model, cb) ->