fix: handle missing timestamps

This commit is contained in:
Barış Soner Uşaklı
2019-05-16 13:09:28 -04:00
parent b70e03a7b0
commit 172e688805

View File

@@ -25,6 +25,7 @@ module.exports = {
function (next) { function (next) {
try { try {
noteData = JSON.parse(note); noteData = JSON.parse(note);
noteData.timestamp = noteData.timestamp || Date.now();
setImmediate(next); setImmediate(next);
} catch (err) { } catch (err) {
next(err); next(err);