Skip to content

Commit 9460f81

Browse files
committed
fix: Prevent error for namespaces without authorizer
1 parent 6893677 commit 9460f81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/uma/src/policies/authorizers/NamespacedAuthorizer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class NamespacedAuthorizer implements Authorizer {
4242
}
4343

4444
// Find applicable authorizer
45-
const authorizer = ns ? this.authorizers[ns] : this.fallback;
45+
const authorizer = (ns && this.authorizers[ns]) || this.fallback;
4646

4747
// Delegate to authorizer
4848
return authorizer.permissions(claims, query);

0 commit comments

Comments
 (0)