Skip to content

Commit 96a6cdc

Browse files
committed
🐛 Fixed label select ordering with infinite scroll
ref https://linear.app/ghost/issue/BER-3402/ The client-side sort used `ignorePunctuation: true` which treated `#` as punctuation, sorting `#label` as `label`. The server's `name asc` ordering puts `#` before alphabetical characters, so newly loaded pages appeared in the wrong position instead of being appended to the list.
1 parent 2bbc0bf commit 96a6cdc

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)