@ -50,12 +50,12 @@ const checkPermissions = (authority, currentAuthority, target, Exception) => {
try {
const bool = authority(currentAuthority);
if (bool) {
// 函数执行后返回值是 Promise
if (isPromise(bool)) {
return <PromiseRender ok={target} error={Exception} promise={bool} />;
}
return target;
return Exception;
} catch (error) {
throw error;