Skip to content

Commit

Permalink
fix(pages/regex-tester): fix handling for empty replacer
Browse files Browse the repository at this point in the history
  • Loading branch information
Eejit43 committed Jul 25, 2024
1 parent 96f06e9 commit f283f2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/public/scripts/pages/tools/regex-tester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function runRegexTester() {
if (textInput.value.length === 0 || regexInput.value.length === 0) {
showAlert('Empty values(s)!', 'warning');
showResult(runButton, 'warning');
} else if (regex && replacer) {
} else if (regex && replacer !== null) {
showResult(runButton, 'success');
outputText.value = textInput.value.replace(regex, replacer);
copyResultButton.disabled = false;
Expand Down

0 comments on commit f283f2a

Please sign in to comment.