0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 03:12:40 +00:00

Trim titles before alphabetical ListPage sorting

This commit is contained in:
G.Ambatte
2023-06-29 16:30:06 +12:00
parent a5885c8f4f
commit 4ded080a58

View File

@@ -89,7 +89,7 @@ const ListPage = createClass({
sortBrewOrder : function(brew){
if(!brew.title){brew.title = 'No Title';}
const mapping = {
'alpha' : _.deburr(brew.title.toLowerCase()),
'alpha' : _.deburr(brew.title.trim().toLowerCase()),
'created' : moment(brew.createdAt).format(),
'updated' : moment(brew.updatedAt).format(),
'views' : brew.views,