Skip to content

Commit 5d94d4d

Browse files
committed
refactor
1 parent a681614 commit 5d94d4d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/components/compare/compare.utils.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,6 @@ export function createOperationChange(
230230
operationDiffs: Diff[],
231231
previous?: ResolvedOperation,
232232
current?: ResolvedOperation,
233-
currGroupSlug?: string,
234-
prevGroupSlug?: string,
235233
currentGroup?: string,
236234
previousGroup?: string,
237235
): OperationChanges {
@@ -240,14 +238,13 @@ export function createOperationChange(
240238
const impactedSummary = calculateImpactedSummary([changeSummary])
241239

242240
const currentOperationFields = current && {
243-
// todo remove one that is excessive: slug or group
244-
operationId: takeSubstringIf(!!currGroupSlug, current.operationId, removeFirstSlash(currentGroup ?? '').length),
241+
operationId: takeSubstringIf(!!currentGroup, current.operationId, removeFirstSlash(currentGroup ?? '').length),
245242
apiKind: current.apiKind,
246243
metadata: getOperationMetadata(current),
247244
}
248245

249246
const previousOperationFields = previous && {
250-
previousOperationId: takeSubstringIf(!!prevGroupSlug, previous.operationId, removeFirstSlash(previousGroup ?? '').length),
247+
previousOperationId: takeSubstringIf(!!previousGroup, previous.operationId, removeFirstSlash(previousGroup ?? '').length),
251248
previousApiKind: previous.apiKind,
252249
previousMetadata: getOperationMetadata(previous),
253250
}

0 commit comments

Comments
 (0)