Skip to content

Commit

Permalink
Fixing embed code output again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ændrew Rininsland committed Jan 23, 2015
1 parent 75f5a56 commit 2dbdb7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/scripts/services/embedcodeoutput.js
Expand Up @@ -43,7 +43,7 @@ angular.module('axisJSApp')
output.push(
'<script type="text/javascript">(function(){' +
'var configJSON = JSON.parse(\'' + config + '\');' +
'var fixJson = function(obj){for(var i in obj)obj.hasOwnProperty(i)&&("string"==typeof obj[i]&&obj[i].match(/^function/)?(console.log("func"),obj[i]=eval("("+obj[i]+")")):"object"==typeof obj[i]&&fixJson(obj[i]));return obj};' +
'var fixJson = function(obj){for(var i in obj)obj.hasOwnProperty(i)&&("string"==typeof obj[i]&&obj[i].match(/^function/)?obj[i]=eval("("+obj[i]+")"):"object"==typeof obj[i]&&fixJson(obj[i]));return obj};' +
'var config = fixJson(configJSON);' +
'c3.generate(config);' +
'})();</script>'
Expand Down

0 comments on commit 2dbdb7b

Please sign in to comment.