From 46f99755db0a6f8369e0a69c3ad1f84dd427083b Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 24 Mar 2023 18:29:39 +0900 Subject: [PATCH] refactor --- packages/backend/src/server/api/endpoints/antennas/create.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/endpoints/antennas/create.ts b/packages/backend/src/server/api/endpoints/antennas/create.ts index 9ee311ace9..b7ce3363a9 100644 --- a/packages/backend/src/server/api/endpoints/antennas/create.ts +++ b/packages/backend/src/server/api/endpoints/antennas/create.ts @@ -79,7 +79,7 @@ export default class extends Endpoint { private globalEventService: GlobalEventService, ) { super(meta, paramDef, async (ps, me) => { - if ((ps.keywords.length === 0) || (ps.keywords[0].filter(x => x !== '').length === 0)) { + if ((ps.keywords.length === 0) || ps.keywords[0].every(x => x === '')) { throw new Error('invalid param'); }