Skip to content

Commit 44d2fa3

Browse files
committed
chore: ,q 1v1 shouldn't parse as ,q 1
1 parent 199c8aa commit 44d2fa3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ps/commands/quotes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,8 @@ export const command: PSCommand = {
614614
const room: string = await getRoom(givenRoom, message, $T);
615615

616616
// Check if it's a number (index lookup)
617-
const index = parseInt(arg);
618-
if (!isNaN(index)) {
617+
if (/^\d+$/.test(arg.trim())) {
618+
const index = parseInt(arg);
619619
const quotes = await getAllQuotes(room);
620620
if (index < 1 || index > quotes.length) {
621621
throw new ChatError($T('COMMANDS.QUOTES.INVALID_INDEX'));

0 commit comments

Comments
 (0)