Skip to content

Commit f3d9d57

Browse files
HejdaJakubxkureck
authored andcommitted
fix(admin): parsing userId on myProfile/attributes page
* We tried to parse userId from url and if it was undefined, then we parsed it from principal. As we changed type notation from as number to Number(), the userId is equal to NaN (if it isn't present in the url) and the check just for undefined was failing, so we didn't parse the userId from principal.
1 parent 42e602d commit f3d9d57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/admin-gui/src/app/users/pages/user-detail-page/user-attributes/user-attributes.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class UserAttributesComponent implements OnInit {
2222
ngOnInit(): void {
2323
this.route.parent.params.subscribe((params) => {
2424
this.userId = Number(params['userId']);
25-
if (this.userId === undefined) {
25+
if (!this.userId) {
2626
this.userId = this.store.getPerunPrincipal().userId;
2727
}
2828

0 commit comments

Comments
 (0)