0

Forum


You need to log in to create posts and topics.

account.service can not compiled with rxjs 6.3

Hi

Can someone help me here?

Error in function  updateRole(role: Role)

return this.accountEndpoint.getRoleByRoleNameEndpoint<Role>(role.name).pipe<Role>(
        mergeMap(foundRole => {
          role.id = foundRole.id;
          return this.accountEndpoint.getUpdateRoleEndpoint(role, role.id)
        }),
        tap(data => this.onRolesChanged([role], AccountService.roleModifiedOperation)));

 

Here's how I resolved it. I removed the second OperatorFunction:

updateRole(role: Role) {
if (role.id) {
return this.accountEndpoint.getUpdateRoleEndpoint(role, role.id).pipe(
tap(data => this.onRolesChanged([role], AccountService.roleModifiedOperation)));
}
else {
return this.accountEndpoint.getRoleByRoleNameEndpoint<Role>(role.name).pipe<Role>(
mergeMap(foundRole => {
role.id = foundRole.id;
return this.accountEndpoint.getUpdateRoleEndpoint(role, role.id)
}));
//,
//tap(data => this.onRolesChanged([role], AccountService.roleModifiedOperation)));
}
}

Hi etichenor,

 

thanks for your help.

 

regards Ingo

I have the same problem. Why?