diff --git a/src/components/Interpretations/common/getInterpretationAccess.js b/src/components/Interpretations/common/getInterpretationAccess.js index 1723b9e4c..11123bc63 100644 --- a/src/components/Interpretations/common/getInterpretationAccess.js +++ b/src/components/Interpretations/common/getInterpretationAccess.js @@ -6,7 +6,9 @@ const hasAuthority = (authorities, authority) => { `"hasAuthority" requires "authority" to be a populated string but received ${authority}` ) } - if (!(Array.isArray(authorities) || authorities instanceof Set)) { + if ( + !(Array.isArray(authorities) || typeof authorities?.has === 'function') + ) { throw new Error( `"hasAuthority" requires "authorities" to be an array or set of authorities (strings)` )