Skip to content

Commit

Permalink
fix: add dual sort fo idempotent result
Browse files Browse the repository at this point in the history
  • Loading branch information
yarastqt committed Jun 9, 2020
1 parent a1e4ac4 commit 0225414
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/load-sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export async function loadSources(path: string[], platform: Platforms): Promise<
const filePlatform = getPlatformFromFilePath(file)
return levels.includes(filePlatform as Platforms)
})
// Use dual sort for idempotent sorting.
.sort()
.sort((a, b) => {
const a1 = getPlatformFromFilePath(a)
const b1 = getPlatformFromFilePath(b)
Expand Down

0 comments on commit 0225414

Please sign in to comment.