fix(versioning): check for null version at regex (#4897)

This commit is contained in:
Michael Kriese 2019-11-28 12:06:44 +01:00 committed by Rhys Arkins
parent 31c1220640
commit 5dc990cfce

View file

@ -68,7 +68,7 @@ export class RegExpVersioningApi extends GenericVersioningApi<RegExpVersion> {
// convenience method for passing a string into a Version given current config.
protected _parse(version: string): RegExpVersion | null {
const match = version.match(this._config);
const match = version ? version.match(this._config) : null;
if (match === null) {
return null;
}