Skip to content

Commit

Permalink
plugin: support mongoose 6
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Nov 7, 2021
1 parent 5e13730 commit e49db57
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugin/src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ async function getAnnounceData(uw, options) {
// the relationships.
const entry = await uw.booth.getCurrentEntry();
if (entry) {
entry.populate('user media.media');
await entry.execPopulate();
if (entry.execPopulate) {
entry.populate('user media.media');
await entry.execPopulate();
} else {
await entry.populate('user media.media');
}
}

// TODO add something to üWave Core so we don't have to manually ask Redis for
Expand Down

0 comments on commit e49db57

Please sign in to comment.