attempt #2 at user obj being null

This commit is contained in:
Tyler Renelle 2013-02-06 22:55:34 -05:00
parent f020eb1162
commit 4bb155939d
2 changed files with 3 additions and 2 deletions

View file

@ -119,7 +119,7 @@ module.exports.setupGrowlNotifications = (model) ->
return unless captures == true
message = "Congratulations, you have unlocked the Party System! You can now group with your friends by adding their User Ids."
$('.main-avatar').popover
title: "Pary System Unlocked"
title: "Party System Unlocked"
placement: 'bottom'
trigger: 'manual'
html: true

View file

@ -43,6 +43,7 @@ get '/', (page, model, next) ->
batch = new schema.BatchUpdate(model)
batch.startTransaction()
obj = batch.obj()
obj = user.get() unless obj.items? #why is this happening?
# Setup Item Store
_view.items =
@ -62,7 +63,7 @@ get '/', (page, model, next) ->
# also update in scoring.coffee. TODO create a function accessible in both locations
(lvl*100)/5
if obj.party?.current?
if obj.party?.current
party.partySubscribe model, obj.party.current, (p) -> page.render()
else
page.render()