mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 11:40:25 +00:00
better check on friend exists
This commit is contained in:
parent
7952cc71a1
commit
6adc5dab40
1 changed files with 1 additions and 1 deletions
|
|
@ -302,7 +302,7 @@ ready (model) ->
|
|||
model.fetch query, (err, users) ->
|
||||
friend = users.at(0).get()
|
||||
debugger
|
||||
if friend.id?
|
||||
if friend?.id?
|
||||
user.push('friends', friendId)
|
||||
$('#add-friend-modal').modal('hide')
|
||||
window.location.reload() #TODO break old subscription, setup new subscript, remove this reload
|
||||
|
|
|
|||
Loading…
Reference in a new issue