Skip to content

Commit 95be524

Browse files
committed
fix: handle potential undefined role_setting in UserDrawer component
1 parent 4711527 commit 95be524

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ui/src/views/system/user-manage/component/UserDrawer.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,13 +291,12 @@ const open = (data: any) => {
291291
userForm.value.password = data.password
292292
userForm.value.phone = data.phone
293293
userForm.value.nick_name = data.nick_name
294-
list.value = data.role_setting.map((item: any) => ({
294+
list.value = data.role_setting?.map((item: any) => ({
295295
...item,
296296
workspace_ids: item.workspace_ids.includes('None') ? [] : item.workspace_ids,
297297
}))
298298
isEdit.value = true
299299
} else {
300-
//需要查询默认密码是啥zxl
301300
userManageApi.getSystemDefaultPassword().then((res: any) => {
302301
userForm.value.password = res.data.password
303302
})

0 commit comments

Comments
 (0)