Fix: unexpected behavior when deleting Option A and renaming Option B with Option A's value. (#13204)
resolve #12345 The issue was caused by the delete running after the update, which led to both the old and new options being deleted when they shared the same value. --------- Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
This commit is contained in:
@ -139,7 +139,13 @@ export class WorkspaceMigrationEnumService {
|
||||
}
|
||||
|
||||
if (allEnumValues?.includes(value)) {
|
||||
return value;
|
||||
const isDestinationOfRename = renamedEnumValues?.some(
|
||||
(enumVal) => enumVal.to === value,
|
||||
);
|
||||
|
||||
if (!isDestinationOfRename) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
if (isDefined(defaultValueFallback)) {
|
||||
|
||||
Reference in New Issue
Block a user