Add spaceship

This commit is contained in:
Visman 2023-09-19 18:54:28 +07:00
parent e45170cd0e
commit 8ade529ff8

View file

@ -376,11 +376,7 @@ abstract class Page extends Model
} }
\uasort($this->pageHeaders, function (array $a, array $b) { \uasort($this->pageHeaders, function (array $a, array $b) {
if ($a['weight'] === $b['weight']) { return $b['weight'] <=> $a['weight'];
return 0;
} else {
return $a['weight'] > $b['weight'] ? -1 : 1;
}
}); });
return $this->pageHeaders; return $this->pageHeaders;