Skip to content

Commit

Permalink
fix(settings): Add nextTick to saveChanges
Browse files Browse the repository at this point in the history
to alleviate race condition

fixes #49335

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Nov 18, 2024
1 parent 4d138a1 commit eef8e4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/settings/src/components/AdminAI.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ import DragVerticalIcon from 'vue-material-design-icons/DragVertical.vue'
import ArrowDownIcon from 'vue-material-design-icons/ArrowDown.vue'
import ArrowUpIcon from 'vue-material-design-icons/ArrowUp.vue'
import { loadState } from '@nextcloud/initial-state'

import { nextTick } from 'vue'
import { generateUrl } from '@nextcloud/router'

export default {
Expand Down Expand Up @@ -185,6 +185,7 @@ export default {
},
async saveChanges() {
this.loading = true
await nextTick()
const data = { settings: this.settings }
try {
await axios.put(generateUrl('/settings/api/admin/ai'), data)
Expand Down

0 comments on commit eef8e4e

Please sign in to comment.