fix bug in post sorting
All checks were successful
/ Deploy blog to deuterium (push) Successful in 1m50s
All checks were successful
/ Deploy blog to deuterium (push) Successful in 1m50s
Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
parent
e2dd1afaa3
commit
6a17f7ed45
1 changed files with 3 additions and 1 deletions
|
@ -166,7 +166,9 @@ func (pl *postList) fetchLocked(filename string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer slices.SortFunc(pl.posts, postLess)
|
||||
defer func() {
|
||||
slices.SortFunc(pl.posts, postLess)
|
||||
}()
|
||||
for i, post := range pl.posts {
|
||||
if post.Slug == p.Slug {
|
||||
pl.posts[i] = p
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue