Skip to content

Commit 8b4fd8e

Browse files
committed
fix: review remarks
1 parent 9dc6b5b commit 8b4fd8e

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/apitypes/rest/rest.changes.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,6 @@ export const compareDocuments = async (
121121
return { operationChanges: [], tags: [] }
122122
}
123123

124-
const currGroupSlug = convertToSlug(currentGroup || '')
125-
const prevGroupSlug = convertToSlug(previousGroup || '')
126-
127124
const tags = new Set<string>()
128125
const changedOperations: OperationChanges[] = []
129126

src/components/compare/compare.utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export function normalizeOperationIds(operations: ResolvedOperation[], apiBuilde
119119
const normalizedOperationIdToOperation: Record<NormalizedOperationId | OperationId, ResolvedOperation> = {}
120120
operations.forEach(operation => {
121121
const normalizedOperationId = apiBuilder.createNormalizedOperationId?.(operation) ?? operation.operationId
122-
// todo '-' is a slugified slash in the middle of a string
122+
// '-' is a slugified slash in the middle of a normalizedOperationId that should also be removed for a proper matching during comparison
123123
normalizedOperationIdToOperation[takeSubstringIf(!!groupSlug, normalizedOperationId, groupSlug.length + '-'.length)] = operation
124124
})
125125
return [Object.keys(normalizedOperationIdToOperation), normalizedOperationIdToOperation]

0 commit comments

Comments
 (0)