Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
taisii committed Feb 20, 2024
1 parent da434f7 commit bea54c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/problems/problemData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ export function generateProgram(programId: ProgramId, languageId: LanguageId): G
});

let index = 0;
const displayProgram = programTemplete['java'].replaceAll(randomNumberRegex, () =>
randomNumberArray[index++].toString()
);
const displayProgram = languageId
? programTemplete[languageId].replaceAll(randomNumberRegex, () => randomNumberArray[index++].toString())
: '';
const generateProgram = {
displayProgram,
excuteProgram: jsProgram,
Expand Down

0 comments on commit bea54c2

Please sign in to comment.