From fee7fa0d4e1e67ee2177728862e6ef0ba709931d Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Thu, 5 Mar 2020 11:53:30 +0100
Subject: [PATCH] fix(hashicorp): check input before isValid

---
 lib/versioning/hashicorp/index.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/versioning/hashicorp/index.ts b/lib/versioning/hashicorp/index.ts
index d04741b17e..ea2d23a1a8 100644
--- a/lib/versioning/hashicorp/index.ts
+++ b/lib/versioning/hashicorp/index.ts
@@ -18,7 +18,7 @@ const isLessThanRange = (version: string, range: string): boolean =>
   npm.isLessThanRange(hashicorp2npm(version), hashicorp2npm(range));
 
 export const isValid = (input: string): string | boolean =>
-  npm.isValid(hashicorp2npm(input));
+  input && npm.isValid(hashicorp2npm(input));
 
 const matches = (version: string, range: string): boolean =>
   npm.matches(hashicorp2npm(version), hashicorp2npm(range));
-- 
GitLab