From 3680ec9af97e5bde8b208f429d9e68176321466d Mon Sep 17 00:00:00 2001 From: Sam Lanning Date: Tue, 28 Aug 2018 19:08:01 -0700 Subject: [PATCH] fix: useless conditional in david.js (#124) --- libs/live-fns/david.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/live-fns/david.js b/libs/live-fns/david.js index c0d491e..5d9cec6 100644 --- a/libs/live-fns/david.js +++ b/libs/live-fns/david.js @@ -15,7 +15,7 @@ module.exports = async (depType, user, repo, ...path) => { peer: 'peer-', optional: 'optional-' }[depType] - const query = path ? `?path=${path.join('/')}` : '' + const query = path.length ? `?path=${path.join('/')}` : '' const endpoint = `https://david-dm.org/${user}/${repo}/${prefix}info.json${query}` const { status } = await axios.get(endpoint).then(res => res.data)