diff --git a/src/components/Authorized/CheckPermissions.js b/src/components/Authorized/CheckPermissions.js index 0c3b9a4c3d5dde7a559231d6950c1fb080ec5b2a..06dc0ab9dba7e7073391e24ba4fd281901dd3b1f 100644 --- a/src/components/Authorized/CheckPermissions.js +++ b/src/components/Authorized/CheckPermissions.js @@ -49,11 +49,11 @@ const checkPermissions = (authority, currentAuthority, target, Exception) => { if (typeof authority === 'function') { try { const bool = authority(currentAuthority); + // 函数执行后返回值是 Promise + if (isPromise(bool)) { + return ; + } if (bool) { - // 函数执行后返回值是 Promise - if (isPromise(bool)) { - return ; - } return target; } return Exception;