Skip to content

Commit

Permalink
Merge pull request #4526 from LibreSign/backport/4520/stable31
Browse files Browse the repository at this point in the history
[stable31] fix: prevent error when enpty data from backend
  • Loading branch information
vitormattos authored Jan 28, 2025
2 parents 35f9608 + 1b080db commit cc12b01
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/views/Settings/AllowedGroups.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default {
idKey: 0,
}),

async mounted() {
async created() {
await this.searchGroup('')
await this.getData()
},
Expand All @@ -64,6 +64,9 @@ export default {
)
.then(({ data }) => {
const groupsSelected = JSON.parse(data.ocs.data.data)
if (!groupsSelected) {
return
}
this.groupsSelected = this.groups.filter(group => {
return groupsSelected.indexOf(group.id) !== -1
})
Expand Down

0 comments on commit cc12b01

Please sign in to comment.