Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
pixer415 authored May 29, 2024
1 parent 1cb5fe3 commit 302ce1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
// listeners
function do_on_input(e) {
var currentValue = e.target.value.substring(0, box.getAttribute("maxlength"));
if (pattrn === null || !pattrn.test(currentValue)) {
if (pattrn !== null && !pattrn.test(currentValue)) {
e.target.value = lastValue;
} else {
lastValue = currentValue;
Expand Down

0 comments on commit 302ce1d

Please sign in to comment.