mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
Merge branch 'develop' into party-chat-translations
# Conflicts: # website/server/controllers/api-v3/user.js
This commit is contained in:
@@ -1106,16 +1106,16 @@ let tavernQ = {_id: TAVERN_ID, 'quest.key': {$ne: null}};
|
||||
// we use process.nextTick because at this point the model is not yet available
|
||||
process.nextTick(() => {
|
||||
model // eslint-disable-line no-use-before-define
|
||||
.findOne(tavernQ).exec()
|
||||
.then(tavern => {
|
||||
if (!tavern) return; // No tavern quest
|
||||
.findOne(tavernQ).exec()
|
||||
.then(tavern => {
|
||||
if (!tavern) return; // No tavern quest
|
||||
|
||||
// Using _assign so we don't lose the reference to the exported tavernQuest
|
||||
_.assign(tavernQuest, tavern.quest.toObject());
|
||||
})
|
||||
.catch(err => {
|
||||
throw err;
|
||||
});
|
||||
// Using _assign so we don't lose the reference to the exported tavernQuest
|
||||
_.assign(tavernQuest, tavern.quest.toObject());
|
||||
})
|
||||
.catch(err => {
|
||||
throw err;
|
||||
});
|
||||
});
|
||||
|
||||
// returns a promise
|
||||
|
||||
Reference in New Issue
Block a user