Commit e685dc68 authored by guowenfh's avatar guowenfh Committed by 陈帅

fix chechPermissions.js isPromise(bool)

parent a8f81804
......@@ -49,11 +49,11 @@ const checkPermissions = (authority, currentAuthority, target, Exception) => {
if (typeof authority === 'function') {
try {
const bool = authority(currentAuthority);
// 函数执行后返回值是 Promise
if (isPromise(bool)) {
return <PromiseRender ok={target} error={Exception} promise={bool} />;
}
if (bool) {
// 函数执行后返回值是 Promise
if (isPromise(bool)) {
return <PromiseRender ok={target} error={Exception} promise={bool} />;
}
return target;
}
return Exception;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment