From df15584af4d3bf545a100a1f9720c0f65da834de Mon Sep 17 00:00:00 2001 From: Dobromir Hristov Date: Wed, 25 Jul 2018 23:57:47 +0300 Subject: [PATCH] fix: return null if not dirty on isValid computed property --- .travis.yaml | 9 +++++++++ src/single-error-extractor-mixin.js | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .travis.yaml diff --git a/.travis.yaml b/.travis.yaml new file mode 100644 index 0000000..a419044 --- /dev/null +++ b/.travis.yaml @@ -0,0 +1,9 @@ +language: node_js +node_js: +- '9' +- '8' + +before_script: + - npm run list + +script: npm run test diff --git a/src/single-error-extractor-mixin.js b/src/single-error-extractor-mixin.js index 05807a5..6c69f39 100644 --- a/src/single-error-extractor-mixin.js +++ b/src/single-error-extractor-mixin.js @@ -51,7 +51,7 @@ export default { return { input: () => this.preferredValidator.$touch() } }, isValid () { - return this.preferredValidator.$dirty && !this.hasErrors + return this.preferredValidator.$dirty ? !this.hasErrors : null } } }