Skip to content

Commit

Permalink
refactor elScope references
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Sep 9, 2016
1 parent 3c9cfd6 commit c8346d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ export default (options) => ({
const elScope = getScope(this.el);
if (! elScope) {
callback = this.expression ? () => {
this.vm.$validator.validate(this.fieldName, this.el.value, getScope(this.el));
this.vm.$validator.validate(this.fieldName, this.el.value, elScope);
} : () => {
this.handler();
};
} else {
callback = this.expression ? (scope) => {
if (scope === elScope) {
this.vm.$validator.validate(this.fieldName, this.el.value, getScope(this.el));
this.vm.$validator.validate(this.fieldName, this.el.value, elScope);
}
} : (scope) => {
if (scope === elScope) {
Expand Down

0 comments on commit c8346d6

Please sign in to comment.