Skip to content

Commit

Permalink
fix gantt chart cli configuration broken #430; remove json quote arou…
Browse files Browse the repository at this point in the history
…nd function in the config e.g. axisFormatter
  • Loading branch information
whyzdev committed Dec 13, 2016
1 parent 95a0cb5 commit 293c23e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/phantomscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ var options = {
, png: system.args[2] === 'true' ? true : false
, svg: system.args[3] === 'true' ? true : false
, css: fs.read(system.args[4])
, sequenceConfig: system.args[5] !== 'null' ? JSON.parse(fs.read(system.args[5])) : '{}'
, ganttConfig: system.args[6] !== 'null' ? JSON.parse(fs.read(system.args[6])) : '{}'
, sequenceConfig: system.args[5] !== 'null' ? JSON.parse(fs.read(system.args[5])) : {}
, ganttConfig: system.args[6] !== 'null' ? JSON.parse(fs.read(system.args[6])) : {}
, verbose: system.args[7] === 'true' ? true : false
, width: width
}
, log = logger(options.verbose)

options.sequenceConfig.useMaxWidth = false;

page.content = [
Expand Down Expand Up @@ -212,7 +211,7 @@ function executeInPage(data) {
var xmlSerializer = new XMLSerializer()
, contents = data.contents
, sequenceConfig = JSON.stringify(data.sequenceConfig)
, ganttConfig = data.ganttConfig
, ganttConfig = JSON.stringify(data.ganttConfig).replace(/"(function.*)}"/, "$1")
, toRemove
, el
, elContent
Expand Down

0 comments on commit 293c23e

Please sign in to comment.