Skip to content

Commit 4bbc4ef

Browse files
committed
null check for account data
1 parent ee3f0b3 commit 4bbc4ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/pages/import.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export default class Import extends Vue {
207207
}
208208
209209
private get hasAuthority (): boolean {
210-
const auths = this.account.posting.account_auths.map(auth => auth[0])
210+
const auths = this.account?.posting?.account_auths?.map(auth => auth[0]) || []
211211
return auths.includes(this.clientId)
212212
}
213213

src/pages/login.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export default class Login extends Vue {
147147
}
148148
149149
private get hasAuthority (): boolean {
150-
const auths = this.account.posting.account_auths.map(auth => auth[0])
150+
const auths = this.account?.posting?.account_auths?.map(auth => auth[0]) || []
151151
return auths.includes(this.clientId)
152152
}
153153

0 commit comments

Comments
 (0)