fix(miui): fix oldPosts been null in redis storage (#331)

This commit is contained in:
Indexyz
2018-07-02 18:35:11 +08:00
committed by DIYgod
parent b86d51f0e0
commit 4095e5c8b4
+4
View File
@@ -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) {