Commit a8f81804 authored by guowenfh's avatar guowenfh Committed by ι™ˆεΈ…

fix checkPermissions if bool

parent 80dc0567
...@@ -50,12 +50,12 @@ const checkPermissions = (authority, currentAuthority, target, Exception) => { ...@@ -50,12 +50,12 @@ const checkPermissions = (authority, currentAuthority, target, Exception) => {
try { try {
const bool = authority(currentAuthority); const bool = authority(currentAuthority);
if (bool) { if (bool) {
// ε‡½ζ•°ζ‰§θ‘ŒεŽθΏ”ε›žε€Όζ˜― Promise
if (isPromise(bool)) {
return <PromiseRender ok={target} error={Exception} promise={bool} />;
}
return target; return target;
} }
// ε‡½ζ•°ζ‰§θ‘ŒεŽθΏ”ε›žε€Όζ˜― Promise
if (isPromise(bool)) {
return <PromiseRender ok={target} error={Exception} promise={bool} />;
}
return Exception; return Exception;
} catch (error) { } catch (error) {
throw error; throw error;
......
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