proper party unsubscribe callbacking
This commit is contained in:
@@ -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 ==========
|
||||
|
||||
|
||||
@@ -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) ->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user