rss: bangumi calendar today: fix undefine and null

This commit is contained in:
DIYgod
2018-05-21 23:33:23 +08:00
parent 826364e02c
commit 152966949e
+1 -1
View File
@@ -10,7 +10,7 @@ module.exports = async (ctx) => {
const cache = await Promise.all(url.map(ctx.cache.get));
const result = await Promise.all(
cache.map(async (c, i) => {
if (c !== undefined) {
if (c) {
return Promise.resolve(JSON.parse(c));
} else {
const response = await axios({