Skip to content

Commit 980913c

Browse files
committed
refactor: remove debug logs and use typeof for undefined argument check in dispute command.
1 parent 11504c0 commit 980913c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

bot/modules/dispute/commands.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ export const handleDispute = async (ctx: MainContext, orderId: string) => {
9494
const dispute = async (ctx: MainContext) => {
9595
try {
9696
const { user } = ctx;
97-
98-
console.log('Total Arguments:', ctx.state.command.args.length);
99-
console.log('Argumentos:', JSON.stringify(ctx.state.command.args));
100-
if (ctx.state.command.args.length > 0 && ctx.state.command.args[0] !== "undefined") {
97+
if (
98+
ctx.state.command.args.length > 0 &&
99+
typeof ctx.state.command.args[0] !== 'undefined'
100+
) {
101101
const params = await validateParams(ctx, 2, '\\<_order id_\\>');
102102

103103
if (!params || params.length === 0) return;

0 commit comments

Comments
 (0)