diff --git a/src/modules/app.service.ts b/src/modules/app.service.ts index adbf831..c01d9dd 100644 --- a/src/modules/app.service.ts +++ b/src/modules/app.service.ts @@ -79,7 +79,7 @@ export function resolveUrlInfo (url: string) { } export function connectionCanEdit(connection: Connection) { - if (connection.privilegeDetailBeanList) { + if (connection && connection.privilegeDetailBeanList) { // privilegeType === 4 代表编辑权限,privilegeValue === 2 代表有权限 return connection.privilegeDetailBeanList.some(item => item.privilegeType === 4 && item.privilegeValue === 2); }