From b367d8030bbfa18b70bf2d50fd64bfdb3df16012 Mon Sep 17 00:00:00 2001 From: Rhys Arkins Date: Sun, 3 Jun 2018 19:07:59 +0200 Subject: [PATCH] fix: suppress empty versionScheme warnings --- lib/versioning/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/versioning/index.js b/lib/versioning/index.js index 1619f98b56..e179235b12 100644 --- a/lib/versioning/index.js +++ b/lib/versioning/index.js @@ -7,9 +7,13 @@ const schemes = { }; module.exports = function getVersionScheme(versionScheme) { + if (!versionScheme) { + logger.debug('Missing versionScheme'); + return semver; + } const scheme = schemes[versionScheme]; if (!scheme) { - logger.warn({ versionScheme }, 'Unknown verion scheme'); + logger.warn({ versionScheme }, 'Unknown version scheme'); return semver; } return scheme;