From d72dccfbe13d5e0da6bd0c67be1de96d0535a17a Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@keylocation.sg>
Date: Fri, 18 Aug 2017 21:01:08 +0200
Subject: [PATCH] fix: do not resolve packageFile content (#698)

---
 lib/config/presets.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/config/presets.js b/lib/config/presets.js
index 3f373491be..fd63f3c04d 100644
--- a/lib/config/presets.js
+++ b/lib/config/presets.js
@@ -20,7 +20,7 @@ async function resolveConfigPresets(
   );
   let config = {};
   // First, merge all the preset configs from left to right
-  if (inputConfig.extends) {
+  if (inputConfig.extends && inputConfig.extends.length) {
     logger.debug('Found presets');
     for (const preset of inputConfig.extends) {
       // istanbul ignore if
@@ -44,7 +44,8 @@ async function resolveConfigPresets(
   logger.trace({ config }, `Post-merge resolve config`);
   for (const key of Object.keys(config)) {
     const val = config[key];
-    if (isObject(val) && key !== 'logger') {
+    const ignoredKeys = ['api', 'content', 'logger'];
+    if (isObject(val) && ignoredKeys.indexOf(key) === -1) {
       // Resolve nested objects
       logger.trace(`Resolving object "${key}"`);
       config[key] = await resolveConfigPresets(val, logger, existingPresets);
-- 
GitLab