Comparing version 3.2.4 to 3.2.5
12
index.js
@@ -150,5 +150,5 @@ const hcat = require('hcat') | ||
let yAxisAlignment | ||
let alignmentFromEnv = getAlignmentFromConfig(config) | ||
let alignmentFromConfig = getAlignmentFromConfig(config) | ||
if (!config.disableAutoAlignYAxis && !alignmentFromEnv) { | ||
if (!config.disableAutoAlignYAxis && !alignmentFromConfig) { | ||
debug('autoAlignYAxis is enabled') | ||
@@ -163,3 +163,3 @@ | ||
// map all to left otherwise | ||
yAxisAlignment = alignmentFromEnv || { left: sliced.map((v, i) => i), right: [] } | ||
yAxisAlignment = alignmentFromConfig || { left: sliced.map((v, i) => i), right: [] } | ||
} | ||
@@ -371,4 +371,5 @@ | ||
function getAlignmentFromConfig(cfg) { | ||
let left = safeJSONParse(cfg.yLeft) | ||
let right = safeJSONParse(cfg.yRight) | ||
let left = Array.isArray(cfg.yLeft) ? cfg.yLeft : safeJSONParse(cfg.yLeft) | ||
let right = Array.isArray(cfg.yRight) ? cfg.yRight : safeJSONParse(cfg.yRight) | ||
@@ -394,2 +395,3 @@ if (!Array.isArray(left)) { | ||
} catch (e) { | ||
debug('safeJSONParse error, this might be ok...', e, str) | ||
if (!(e instanceof SyntaxError)) { | ||
@@ -396,0 +398,0 @@ throw e |
{ | ||
"name": "catchart", | ||
"version": "3.2.4", | ||
"version": "3.2.5", | ||
"description": "Pipe something from command line to a browser chart", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
567872
689