Skip to content

Commit 3345ea4

Browse files
committed
Sort feeds by source URL
1 parent ad7411f commit 3345ea4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/_data/depctrl.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,13 @@ function fillTemplateVar(data, repDict = {}, parentKey = "", depth = 0) {
248248
return data;
249249
}
250250

251+
const sortFeeds = (feeds) => {
252+
return feeds.sort((a, b) => a["_sourceUrl"].localeCompare(b["_sourceUrl"]));
253+
}
254+
251255
// store data locally to not compute feeds multiple times
252256
const data = fetchAllFeeds(seedFeed)
257+
.then(sortFeeds)
253258
.then(fillTemplateVar)
254259
.then(checkFileIntegrity)
255260
.then(extractScriptData)

0 commit comments

Comments
 (0)