Skip to content
Snippets Groups Projects
Unverified Commit 889a0ddf authored by Gaëlle Fournier's avatar Gaëlle Fournier Committed by GitHub
Browse files

TULEAP 20313: Fix null pointer (#344)


Co-authored-by: default avatarMaël QUAISSARD <mael.quaissard@smile.fr>
parent aef7839f
No related branches found
No related tags found
1 merge request!51Merge mis a jour vitam-ui
......@@ -79,7 +79,7 @@ export class SecurityProfilePermissionsTabComponent {
unchanged(): boolean {
let unchanged = true;
if (this.form.getRawValue().permissions != undefined) {
if (this.previousValue().permissions && this.previousValue().permissions) {
if (this.form.getRawValue().permissions.length !== this.previousValue().permissions.length) {
unchanged = false;
} else {
......@@ -92,6 +92,17 @@ export class SecurityProfilePermissionsTabComponent {
unchanged = false;
}
}
} else if ((
!this.form.getRawValue().permissions &&
this.previousValue().permissions &&
this.previousValue().permissions.length > 0
) || (
this.form.getRawValue().permissions &&
this.form.getRawValue().permissions.length > 0 &&
!this.previousValue().permissions
)
) {
unchanged = false;
}
this.updated.emit(!unchanged);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment