RolePicker: Only update org role if the value has changed (#51239)

This commit is contained in:
Karl Persson authored and GitHub committed 2022-06-22 14:47:47 +02:00
1 parent f9becc2d4f
commit 454f65cd88
1 file changed
+1 -1
@@ -106,7 +106,7 @@ export const RolePicker = ({
};
const onUpdate = (newRoles: Role[], newBuiltInRole?: OrgRole) => {
if (onBuiltinRoleChange && newBuiltInRole) {
if (onBuiltinRoleChange && newBuiltInRole && newBuiltInRole !== builtInRole) {
onBuiltinRoleChange(newBuiltInRole);
}
onRolesChange(newRoles);