Skip to content
Snippets Groups Projects
Unverified Commit dfef9f3c authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

fix: handle non-string currentValue (#11472)

parent 4871f414
No related branches found
No related tags found
No related merge requests found
import is from '@sindresorhus/is';
import { logger } from '../../../../logger';
import type { VersioningApi } from '../../../../versioning/types';
import type { LookupUpdateConfig } from './types';
......@@ -10,6 +11,10 @@ export function getCurrentVersion(
allVersions: string[]
): string | null {
const { currentValue, lockedVersion } = config;
// istanbul ignore if
if (!is.string(currentValue)) {
return null;
}
if (versioning.isVersion(currentValue)) {
return currentValue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment