We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29d98ca commit 91429ffCopy full SHA for 91429ff
utils/versionAnchor.ts
@@ -7,6 +7,8 @@ import {
7
Version,
8
} from './versionCore';
9
10
+export const FALLBACK_ANCHOR_VERSION: Version = '0.31.0';
11
+
12
export async function detectAnchorVersion(
13
language: Language
14
): Promise<Version> {
@@ -22,8 +24,8 @@ export async function detectAnchorVersion(
22
24
export function resolveAnchorVersion(
23
25
detectedVersion: Version | undefined
26
): ResolvedVersion | undefined {
- if (!detectedVersion) return undefined;
- const [full, withoutPatch] =
27
- getVersionAndVersionWithoutPatch(detectedVersion);
+ const [full, withoutPatch] = getVersionAndVersionWithoutPatch(
28
+ detectedVersion ?? FALLBACK_ANCHOR_VERSION
29
+ );
30
return { full, withoutPatch, detected: detectedVersion };
31
}
0 commit comments