From c8c149d84faeeb46ca05731b89259125298474bf Mon Sep 17 00:00:00 2001 From: Michael Gallaspy Date: Tue, 12 Nov 2024 09:07:20 -0800 Subject: [PATCH] Update src/actions.ts Co-authored-by: Guangcong Luo --- src/actions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/actions.ts b/src/actions.ts index 7ccabc6..1c78ad9 100644 --- a/src/actions.ts +++ b/src/actions.ts @@ -908,7 +908,8 @@ export const actions: {[k: string]: QueryHandler} = { if (!params.ids) { throw new ActionError("Invalid batch replay request, must provide ids"); } - const ids = params.ids.split(',').slice(0, 51); + const ids = params.ids.split(','); + if (ids.length > 51) throw new ActionError(`Limit 51 IDs (you have ${ids.length}).`); return Replays.getBatch(ids); }, // sent by ps server