From 21a5714fdad738ffb0cfadaec650c3282e9e2113 Mon Sep 17 00:00:00 2001 From: Chenyang Shi Date: Fri, 15 Mar 2019 10:29:02 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BB=80=E4=B9=88=E5=80=BC=E5=BE=97?= =?UTF-8?q?=E4=B9=B0=E6=8E=92=E8=A1=8C=E6=A6=9C=E4=B8=BA=E7=A9=BA=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/smzdm/ranking.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/smzdm/ranking.js b/lib/routes/smzdm/ranking.js index 318177fd69d283..92eb44a708bfa3 100644 --- a/lib/routes/smzdm/ranking.js +++ b/lib/routes/smzdm/ranking.js @@ -14,7 +14,7 @@ module.exports = async (ctx) => { const data = response.data.data.list; const list1 = []; const list2 = []; - for (let i = 0; i < 6; i++) { + for (let i = 0; i < Math.min(6, data.length); i++) { list1.push(data[i][0]); list2.push(data[i][1]); }