We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 199c8aa commit 44d2fa3Copy full SHA for 44d2fa3
1 file changed
src/ps/commands/quotes.tsx
@@ -614,8 +614,8 @@ export const command: PSCommand = {
614
const room: string = await getRoom(givenRoom, message, $T);
615
616
// Check if it's a number (index lookup)
617
- const index = parseInt(arg);
618
- if (!isNaN(index)) {
+ if (/^\d+$/.test(arg.trim())) {
+ const index = parseInt(arg);
619
const quotes = await getAllQuotes(room);
620
if (index < 1 || index > quotes.length) {
621
throw new ChatError($T('COMMANDS.QUOTES.INVALID_INDEX'));
0 commit comments