Skip to content

Commit

Permalink
Revert "prefer Array#toSorted over Array#sort"
Browse files Browse the repository at this point in the history
This reverts commit 59ca7a5.
  • Loading branch information
yuheiy committed Oct 4, 2023
1 parent 4e3e96b commit 25f6e62
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const title = 'ウェブサイト構築のためのモダンなフロントエ
const description =
'sdenvは、ウェブアプリケーションではなくウェブサイトを開発するためのベストプラクティスに基づいて構成されたフロントエンド開発環境です。やりすぎないちょうどいい使い勝手の実現を念頭に置いて設計されている、より多くのウェブサイト開発者のためのツールキットです。';
const newsEntries = (await getCollection('news')).toSorted(
const newsEntries = (await getCollection('news')).sort(
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(),
);
---
Expand Down
2 changes: 1 addition & 1 deletion src/pages/news/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Layout from '@/layouts/Layout.astro';
const title = 'お知らせ';
const description = '';
const newsEntries = (await getCollection('news')).toSorted(
const newsEntries = (await getCollection('news')).sort(
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(),
);
---
Expand Down
2 changes: 1 addition & 1 deletion src/pages/work/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Layout from '@/layouts/Layout.astro';
const title = '実績';
const description = '';
const workEntries = (await getCollection('work')).toSorted(
const workEntries = (await getCollection('work')).sort(
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(),
);
---
Expand Down

0 comments on commit 25f6e62

Please sign in to comment.