Fix lint errors in lint error fix.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2020-04-22 21:00:31 +03:00
parent e7603298d7
commit 9e95c06415
9 changed files with 47 additions and 49 deletions

View file

@ -1297,7 +1297,10 @@ if (Meteor.isServer) {
// Insert new board at last position in sort order.
Boards.before.insert((userId, doc) => {
const lastBoard = Boards.findOne({ sort: { $exists: true } }, { sort: { sort: -1 } });
const lastBoard = Boards.findOne(
{ sort: { $exists: true } },
{ sort: { sort: -1 } },
);
if (lastBoard && typeof lastBoard.sort !== 'undefined') {
doc.sort = lastBoard.sort + 1;
}