Fixed bug

This commit is contained in:
dbroqua 2019-12-29 13:09:17 +01:00
parent 0c015f6c66
commit fd73402e48

View file

@ -16,7 +16,7 @@ class Db {
createdAt: 'desc' createdAt: 'desc'
}) })
.limit(1) .limit(1)
.exec(function (err, last) { .exec((err, last) => {
if (err || if (err ||
last.length === 0 || last.length === 0 ||
(last[0] !== undefined && (last[0] !== undefined &&