conflict: object cloning makes properties unavailable sometimes, but
it fixes subscriptions.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user