Skip to content

Commit 5e8519d

Browse files
committed
feat: filter out any invalid versions and sort them
1 parent 4a05e86 commit 5e8519d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/pilot.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ export function migrate(
4545
return clonedSource as MigrateSource
4646
}
4747

48+
versions = versions.filter(
49+
(version) => Number.isInteger(version.version) && version.version > 0
50+
)
51+
52+
versions = versions.sort((a, b) => a.version - b.version)
53+
4854
for (const version of versions) {
4955
if (version.version <= clonedSource.__pilot.version) {
5056
continue

0 commit comments

Comments
 (0)