From d16d3a010c5386775f189b0309268ba1e45810fb Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 16 Sep 2016 12:23:43 +0100 Subject: Ignore blank lines in style map --- lib/options-reader.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/options-reader.js') diff --git a/lib/options-reader.js b/lib/options-reader.js index 3765fd3..dc17fe8 100644 --- a/lib/options-reader.js +++ b/lib/options-reader.js @@ -75,11 +75,11 @@ function readCustomStyleMap(styleMap) { return []; } else if (_.isString(styleMap)) { return styleMap.split("\n") - .filter(function(line) { - return line.charAt(0) !== "#"; - }) .map(function(line) { return line.trim(); + }) + .filter(function(line) { + return line !== "" && line.charAt(0) !== "#"; }); } else { return styleMap; -- cgit v1.2.3