Skip to content

Commit 166f4a5

Browse files
authored
Fix: Use order-independent tag comparison in tag wizard (#30)
Use sort-and-join comparison to handle both reordering and duplicates correctly. Closes #22
1 parent f4b9dbf commit 166f4a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/tui/apps/tag/app.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ function ConfirmStep({
240240
})
241241
const customCurrentTags = currentTags.filter((t) => t !== "latest")
242242
const tagsChanged =
243-
tags.length !== customCurrentTags.length || tags.some((t, i) => t !== customCurrentTags[i])
243+
tags.length !== customCurrentTags.length ||
244+
[...tags].sort().join(",") !== [...customCurrentTags].sort().join(",")
244245
return (
245246
<Box flexDirection="column">
246247
<Text bold>Confirm update for {expertKey}:</Text>

0 commit comments

Comments
 (0)