Skip to content

Commit 2a6f1e3

Browse files
authored
WEB-932: Guard against null credentials in HasPermissionDirective (#3531)
Signed-off-by: Aditya Tiwari <adityatiwari342005@gmail.com>
1 parent bd48f54 commit 2a6f1e3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/app/directives/has-permission/has-permission.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class HasPermissionDirective {
3838
*/
3939
constructor() {
4040
const savedCredentials = this.authenticationService.getCredentials();
41-
this.userPermissions = savedCredentials.permissions;
41+
this.userPermissions = savedCredentials?.permissions ?? [];
4242
}
4343

4444
/**

0 commit comments

Comments
 (0)