Use variable to make canSave clearer

This commit is contained in:
leigh-mil 2019-07-18 14:59:56 -04:00
parent 90b057d0b2
commit 41f21ad830

View File

@ -50,9 +50,11 @@ export default {
computed: {
canSave: function() {
if (!this.invalid) {
const formValid = !this.invalid
if (formValid) {
return true
} else if (this.changed && !this.invalid) {
} else if (this.changed && formValid) {
return true
} else {
return false