Browse Source

fix checkPermissions if bool

pull/1697/head
guowenfh 8 years ago
committed by 陈帅
parent
commit
a8f8180485
  1. 8
      src/components/Authorized/CheckPermissions.js

8
src/components/Authorized/CheckPermissions.js

@ -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;
}
// 函数执行后返回值是 Promise
if (isPromise(bool)) {
return <PromiseRender ok={target} error={Exception} promise={bool} />;
}
return Exception;
} catch (error) {
throw error;

Loading…
Cancel
Save