Commit 8290e24d authored by 陈帅's avatar 陈帅

fix Authorize error in ie11

parent 9ef3ce09
......@@ -6,12 +6,12 @@ let CURRENT = 'NULL';
*/
const renderAuthorize = Authorized => currentAuthority => {
if (currentAuthority) {
if (currentAuthority.constructor.name === 'Function') {
if (typeof currentAuthority === 'function') {
CURRENT = currentAuthority();
}
if (
currentAuthority.constructor.name === 'String' ||
currentAuthority.constructor.name === 'Array'
Object.prototype.toString.call(currentAuthority) === '[object String]' ||
Array.isArray(currentAuthority)
) {
CURRENT = currentAuthority;
}
......
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