From 65fd45f9d8d690ddc2dfb732627f05967c0eff50 Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Wed, 7 Mar 2018 18:24:49 -0500 Subject: [PATCH] fix: check publish props only in verify ones are undefined --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index d5df110a..7f0ec636 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -const {castArray} = require('lodash'); +const {defaultTo, castArray} = require('lodash'); const verifyChangelog = require('./lib/verify'); const prepareChangelog = require('./lib/prepare'); @@ -10,7 +10,7 @@ async function verifyConditions(pluginConfig, {options}) { const preparePlugin = castArray(options.prepare).find(config => config.path && config.path === '@semantic-release/changelog') || {}; - pluginConfig.changelogFile = pluginConfig.changelogFile || preparePlugin.changelogFile; + pluginConfig.changelogFile = defaultTo(pluginConfig.changelogFile, preparePlugin.changelogFile); } await verifyChangelog(pluginConfig); verified = true;