Fixing attribute ordering again.

This commit is contained in:
Sergiotarxz 2023-09-17 06:03:49 +02:00
parent d011f605d2
commit 2bc7c60246
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,7 @@ sub RetrieveAllPostsForCategory ( $self, $category_name ) {
sub shufflePostsIfRequired ( $self, $category, $posts ) {
my $pinned_posts = [
sort { $b->{pinned} <=> $b->{pinned} }
sort { $b->{pinned} <=> $a->{pinned} }
grep { defined $_->{pinned} } @$posts
];
$posts = [ grep { !exists $_->{pinned} } @$posts ];