From 2aae935ffed6e9690262302bc575ac2ab59a8300 Mon Sep 17 00:00:00 2001 From: Joost De Cock Date: Sun, 16 Dec 2018 18:28:37 +0100 Subject: [PATCH] :bug: Handling of settings.only=false --- src/pattern.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pattern.js b/src/pattern.js index 65290f29e73..66c126eb2b3 100644 --- a/src/pattern.js +++ b/src/pattern.js @@ -445,7 +445,8 @@ Pattern.prototype.resolveDependencies = function( * configured dependencies. */ Pattern.prototype.needs = function(partName) { - if (typeof this.settings.only === "undefined") return true; + if (typeof this.settings.only === "undefined" || this.settings.only === false) + return true; else if (typeof this.settings.only === "string") { if (this.settings.only === partName) return true; if (Array.isArray(this.config.resolvedDependencies[this.settings.only])) { @@ -480,7 +481,10 @@ Pattern.prototype.isHidden = function(partName) { * This depends on the 'only' setting */ Pattern.prototype.wants = function(partName) { - if (typeof this.settings.only === "undefined") { + if ( + typeof this.settings.only === "undefined" || + this.settings.only === false + ) { if (this.isHidden(partName)) return false; } else if (typeof this.settings.only === "string") { if (this.settings.only === partName) return true;