Commit 8290e24d authored by ι™ˆεΈ…'s avatar ι™ˆεΈ…

fix Authorize error in ie11

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