Skip to content

Commit

Permalink
Merge pull request #38863 from bernhardoj/fix/38666-tag-becomes-disab…
Browse files Browse the repository at this point in the history
…led-when-renaming

Fix tag becomes disabled when renaming
  • Loading branch information
luacmartins authored Mar 25, 2024
2 parents 4bc6744 + 47f8ff2 commit 19ed990
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/actions/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3114,7 +3114,7 @@ function clearPolicyTagErrors(policyID: string, tagName: string) {

function renamePolicyTag(policyID: string, policyTag: {oldName: string; newName: string}) {
const tagListName = Object.keys(allPolicyTags?.[`${ONYXKEYS.COLLECTION.POLICY_TAGS}${policyID}`] ?? {})[0];
const oldTag = allPolicyTags?.[`${ONYXKEYS.COLLECTION.POLICY_TAGS}${policyID}`]?.[policyTag.oldName] ?? {};
const oldTag = allPolicyTags?.[`${ONYXKEYS.COLLECTION.POLICY_TAGS}${policyID}`]?.[tagListName]?.tags?.[policyTag.oldName] ?? {};
const onyxData: OnyxData = {
optimisticData: [
{
Expand Down

0 comments on commit 19ed990

Please sign in to comment.