Skip to content

Commit

Permalink
Fix unintended submissions in Firefox caused by undefined value
Browse files Browse the repository at this point in the history
  • Loading branch information
LiteracyFanatic committed Nov 1, 2023
1 parent ab9ef9c commit ae4344a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,9 @@ export class ValidationService {

// Firefox fix: redispatch 'submit' after finished handling this event
await new Promise(resolve => setTimeout(resolve, 0));
this.handleValidated(form, success, e);
if (e) {
this.handleValidated(form, success, e);
}
}).catch(error => {
this.logger.log('Validation error', error);
}).finally(() => {
Expand Down

0 comments on commit ae4344a

Please sign in to comment.