mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-19 02:04:10 +00:00
conflict: object cloning makes properties unavailable sometimes, but
it fixes subscriptions.
This commit is contained in:
parent
6292b7adce
commit
dfc63695c7
1 changed files with 2 additions and 2 deletions
|
|
@ -82,8 +82,8 @@ module.exports.BatchUpdate = BatchUpdate = (model) ->
|
|||
# many cases, userObj.tasks.{taskId}.value is undefined - so we manually .get() each attribute here.
|
||||
# Additionally, for some reason after getting the user object, changing properies manually (userObj.stats.hp = 50)
|
||||
# seems to actually run user.set('stats.hp',50) which we don't want to do - so we deepClone here
|
||||
#_.each Object.keys(userSchema), (key) -> userObj[key] = lodash.cloneDeep user.get(key)
|
||||
obj = lodash.cloneDeep user.get()
|
||||
#_.each Object.keys(userSchema), (key) -> obj[key] = lodash.cloneDeep user.get(key)
|
||||
obj = user.get()
|
||||
|
||||
###
|
||||
Handles updating the user model. If this is an en-mass operation (eg, server cron), changes are queued
|
||||
|
|
|
|||
Loading…
Reference in a new issue