Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit 0bd64a2

Browse files
samoussfrancoischalifour
authored andcommitted
fix(cli): Fallback on latest version when stable unavailable (#50)
1 parent 9a2481c commit 0bd64a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/cli/cli.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ const questions = [
111111
const versions = await fetchLibraryVersions(libraryName);
112112
const latestStableVersion = latestSemver(versions);
113113

114+
if (!latestStableVersion) {
115+
return versions;
116+
}
117+
114118
return [
115119
new inquirer.Separator('Latest stable version (recommended)'),
116120
latestStableVersion,

0 commit comments

Comments
 (0)