Skip to content

Commit f76e1c9

Browse files
committed
Fixes velopert#41
1 parent c509aac commit f76e1c9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

velog-backend/src/router/series/series.ctrl.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ export const listSeries = async (ctx: Context) => {
196196
],
197197
order: [['updated_at', 'DESC']],
198198
});
199+
if (seriesList.length === 0) {
200+
ctx.body = [];
201+
return;
202+
}
199203
const counts = await getSeriesPostCountList(seriesList.map(series => series.id));
200204
const flatData = {};
201205
counts.forEach((c) => {

0 commit comments

Comments
 (0)