From 99c2d096f70952c4cee7d03444d61996dca461ad Mon Sep 17 00:00:00 2001 From: Ean Milligan Date: Sat, 3 May 2025 19:06:43 -0400 Subject: [PATCH] add default param --- src/artigen/artigen.ts | 2 +- src/artigen/cmdTokenizer.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/artigen/artigen.ts b/src/artigen/artigen.ts index 5018677..41ef654 100644 --- a/src/artigen/artigen.ts +++ b/src/artigen/artigen.ts @@ -41,7 +41,7 @@ export const runCmd = (fullCmd: string, modifiers: RollModifiers): SolvedRoll => assertPrePostBalance(sepCmds); // Send the split roll into the command tokenizer to get raw response data - const [tempReturnData, tempCountDetails] = tokenizeCmd(sepCmds, modifiers, true, []); + const [tempReturnData, tempCountDetails] = tokenizeCmd(sepCmds, modifiers, true); loggingEnabled && log(LT.LOG, `Return data is back ${JSON.stringify(tempReturnData)}`); // Remove any floating spaces from fullCmd diff --git a/src/artigen/cmdTokenizer.ts b/src/artigen/cmdTokenizer.ts index 06296f2..d0bd0d4 100644 --- a/src/artigen/cmdTokenizer.ts +++ b/src/artigen/cmdTokenizer.ts @@ -15,7 +15,7 @@ import { loggingEnabled } from 'artigen/utils/logFlag.ts'; import { getMatchingInternalIdx, getMatchingPostfixIdx } from 'artigen/utils/parenBalance.ts'; // tokenizeCmd expects a string[] of items that are either config.prefix/config.postfix or some text that contains math and/or dice rolls -export const tokenizeCmd = (cmd: string[], modifiers: RollModifiers, topLevel: boolean, previousResults: number[]): [ReturnData[], CountDetails[]] => { +export const tokenizeCmd = (cmd: string[], modifiers: RollModifiers, topLevel: boolean, previousResults: number[] = []): [ReturnData[], CountDetails[]] => { loggingEnabled && log(LT.LOG, `Tokenizing command ${JSON.stringify(cmd)}`); const returnData: ReturnData[] = [];