From 4095e5c8b424d90ad30a25969e465758a6e5565d Mon Sep 17 00:00:00 2001 From: Indexyz Date: Mon, 2 Jul 2018 18:35:11 +0800 Subject: [PATCH] fix(miui): fix oldPosts been null in redis storage (#331) --- routes/miui/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routes/miui/index.js b/routes/miui/index.js index f2985427c..d41296231 100644 --- a/routes/miui/index.js +++ b/routes/miui/index.js @@ -34,6 +34,10 @@ module.exports = async (ctx) => { /** no need handle here: parseError */ } + if (oldPosts === null) { + oldPosts = []; + } + let item = oldPosts; if (oldPosts.length === 0 || oldPosts[0].description !== responseData.LatestFullRom.filename) {