From e195c731de88aba4026c239f4552ae821d522ec7 Mon Sep 17 00:00:00 2001 From: "Sam X. Chen" Date: Tue, 29 Oct 2019 17:45:06 -0400 Subject: Change the radom to random typo in export.js --- models/cards.js | 8 +++++--- models/export.js | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/models/cards.js b/models/cards.js index 27dda0ee..a43402bb 100644 --- a/models/cards.js +++ b/models/cards.js @@ -1696,10 +1696,12 @@ if (Meteor.isServer) { const activityType = `a-${action}`; const card = Cards.findOne(doc._id); const list = card.list(); - if (list && action === 'endAt') { - // change list modifiedAt + if (list) { + // change list modifiedAt, when user modified the key values in timingaction array, if it's endAt, put the modifiedAt of list back to one year ago for sorting purpose const modifiedAt = new Date( - new Date(value).getTime() - 365 * 24 * 3600 * 1e3, + new Date(value).getTime() - (action === 'endAt') + ? 365 * 24 * 3600 * 1e3 + : 0, ); // set it as 1 year before const boardId = list.boardId; Lists.direct.update( diff --git a/models/export.js b/models/export.js index 5d356487..056eefdc 100644 --- a/models/export.js +++ b/models/export.js @@ -142,7 +142,7 @@ export class Exporter { // callback has the form function (err, res) {} const tmpFile = path.join( os.tmpdir(), - `tmpexport${process.pid}${Math.radom()}`, + `tmpexport${process.pid}${Math.random()}`, ); const tmpWriteable = fs.createWriteStream(tmpFile); const readStream = doc.createReadStream(); -- cgit v1.2.3-1-g7c22