From 47dd948d960f335a0c2fdb13e3921d07df74e964 Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Mon, 8 Jul 2019 04:51:15 +0100 Subject: [PATCH] fix: remove a redundant variable assignment (#2580) Value assigned to variable 'type' at this point is not used afterwards. --- lib/routes/universities/swust/cs.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/routes/universities/swust/cs.js b/lib/routes/universities/swust/cs.js index 5e658dcde..3a1a3cb3c 100644 --- a/lib/routes/universities/swust/cs.js +++ b/lib/routes/universities/swust/cs.js @@ -10,7 +10,7 @@ module.exports = async (ctx) => { responseType: 'buffer', }); - let type = ctx.params.type || 1; + const type = ctx.params.type || 1; let info = '新闻动态'; let word = 'news'; if (type === '2') { @@ -22,8 +22,6 @@ module.exports = async (ctx) => { } else if (type === '4') { info = '教研动态'; word = 'Teach_Research'; - } else { - type = '1'; } const response = await got_ins.get(host + word);