Skip to content

Commit 895aa01

Browse files
🐛 Fixed #-prefixed member label select ordering when scrolling (#26702)
closes https://linear.app/ghost/issue/BER-3402/ - Removed `ignorePunctuation: true` from label client-side sort to match server ordering - `ignorePunctuation` caused `#`-prefixed labels to sort as if the `#` didn't exist, but the server's `name asc` puts `#` before alphabetical characters - This mismatch meant each new page of labels loaded via infinite scroll appeared in the wrong position instead of appending to the list
1 parent 3671359 commit 895aa01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ghost/admin/app/services/labels-manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default class LabelsManagerService extends Service {
2626
sortLabels(labels = []) {
2727
return labels
2828
.filter(label => label.get('id') !== null)
29-
.sort((labelA, labelB) => (labelA.name || '').localeCompare((labelB.name || ''), undefined, {ignorePunctuation: true}));
29+
.sort((labelA, labelB) => (labelA.name || '').localeCompare((labelB.name || '')));
3030
}
3131

3232
findBySlug(slug) {

0 commit comments

Comments
 (0)