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: { computed: {
canSave: function() { canSave: function() {
if (!this.invalid) { const formValid = !this.invalid
if (formValid) {
return true return true
} else if (this.changed && !this.invalid) { } else if (this.changed && formValid) {
return true return true
} else { } else {
return false return false