mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
use assign in place of merge, make sure references to tavern and mods are not lost
This commit is contained in:
@@ -236,7 +236,8 @@ module.exports.tavern = {};
|
||||
var tavernQ = {_id:'habitrpg','quest.key':{$ne:null}};
|
||||
process.nextTick(function(){
|
||||
mongoose.model('Group').findOne(tavernQ,function(err,tavern){
|
||||
module.exports.tavern = tavern;
|
||||
// Using _assign so we don't lose the reference to the exported tavern
|
||||
_.assign(module.exports.tavern, tavern);
|
||||
});
|
||||
})
|
||||
GroupSchema.statics.tavernBoss = function(user,progress) {
|
||||
|
||||
Reference in New Issue
Block a user