Skip to content

Commit 5a18bd1

Browse files
committed
chore: update comment
1 parent 393fa84 commit 5a18bd1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/helpers/sort.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export const compareStrings = (a: string, b: string) => {
7777
// Case 5: ZA, AA - multiple chars, only second letters match
7878
// Case 6: ZA, AZ - multiple chars, no match
7979

80+
// Both
8081
// Case 7: AA, Z - multiple chars, and single char
8182
// Case 8: Z, AA - single char, and multiple chars
8283

@@ -155,15 +156,14 @@ export const sortProducts = (products: ProductTuple[], method: SortMethod) => {
155156
continue;
156157
}
157158

158-
// swap based on shelf if both match
159159
// Case 2: swap based on shelf if both match
160160
if (compare === Compare.EQUALS) {
161161
if (Number(currentShelf) > Number(nextShelf)) {
162162
swap(result, i, i + 1);
163163
}
164164
}
165165

166-
// swap based on bay
166+
// Case 3: swap based on bay
167167
if (compare === Compare.BIGGER_THAN) {
168168
swap(result, i, i + 1);
169169
}

0 commit comments

Comments
 (0)