fix lint warning (#335)
This commit is contained in:
parent
95100ae5b0
commit
e3e353a610
|
|
@ -31,7 +31,7 @@ module.exports = async (ctx) => {
|
||||||
try {
|
try {
|
||||||
oldPosts = JSON.parse(await ctx.cache.get(cacheName));
|
oldPosts = JSON.parse(await ctx.cache.get(cacheName));
|
||||||
} catch (_e) {
|
} catch (_e) {
|
||||||
/** no need handle here: parseError */
|
// no need handle here: parseError
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldPosts === null) {
|
if (oldPosts === null) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ const config = require('../../config');
|
||||||
const util = require('./util');
|
const util = require('./util');
|
||||||
|
|
||||||
module.exports = async (ctx) => {
|
module.exports = async (ctx) => {
|
||||||
let tag = ctx.params.tag || 'ntr';
|
const tag = ctx.params.tag || 'ntr';
|
||||||
|
|
||||||
const url = `https://blog.reimu.net/archives/tag/${tag}`;
|
const url = `https://blog.reimu.net/archives/tag/${tag}`;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
const util = {
|
const util = {
|
||||||
getArticleData(articles, $) {
|
getArticleData(articles, $) {
|
||||||
if (!articles) return [];
|
if (!articles) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
return articles
|
return articles
|
||||||
.map((index, article) => {
|
.map((index, article) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue