diff --git a/src/components/Authorized/renderAuthorize.js b/src/components/Authorized/renderAuthorize.js index 5c5daa68cce8605d356a77b1d9c2f5449e7631f6..be373d996bb38445af1c6e912bdac32ad594747d 100644 --- a/src/components/Authorized/renderAuthorize.js +++ b/src/components/Authorized/renderAuthorize.js @@ -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; }