Skip to content

Commit

Permalink
add missing hasErrors property
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve-Mcl committed Jul 18, 2023
1 parent 3b8d274 commit 37f63b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/pages/instance/Settings/Environment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<form class="space-y-6">
<TemplateSettingsEnvironment v-model="editable" :readOnly="!hasPermission('device:edit-env')" :editTemplate="false" />
<div v-if="hasPermission('device:edit-env')" class="space-x-4 whitespace-nowrap">
<ff-button size="small" :disabled="!unsavedChanges" @click="saveSettings()">Save settings</ff-button>
<ff-button size="small" :disabled="!unsavedChanges || hasErrors" @click="saveSettings()">Save settings</ff-button>
</div>
</form>
</template>
Expand Down Expand Up @@ -54,6 +54,7 @@ export default {
data () {
return {
unsavedChanges: false,
hasErrors: false,
editable: {
name: '',
settings: { env: [] },
Expand Down Expand Up @@ -84,7 +85,7 @@ export default {
let originalCount = 0
this.editable.settings.env.forEach(field => {
errors = errors || field.error
errors = errors || !!field.error
if (/^add/.test(field.index)) {
changed = true
} else {
Expand Down

0 comments on commit 37f63b0

Please sign in to comment.