Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
fix(aurelia-form): check if validated
Browse files Browse the repository at this point in the history
  • Loading branch information
RWOverdijk committed Feb 23, 2017
1 parent dc51dc2 commit bfbff52
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/component/aurelia-form.js
Expand Up @@ -57,7 +57,13 @@ export class AureliaForm {
return logger.warn('Validation on forms requires a entity to validate.');
}
this.validate().then(result => {
let validate = this.validate();
if (!validate) {
return;
}
validate.then(result => {
if (result.valid) {
return this.emit('valid');
}
Expand Down

0 comments on commit bfbff52

Please sign in to comment.