Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
Ensure JSON config object is not a string.
Browse files Browse the repository at this point in the history
  • Loading branch information
toniwidmo committed Nov 23, 2017
1 parent 061fb3b commit a389fd8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions init.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ function configFail() {
console.log('FAILED TO LOAD CONFIG!');
}
function parseConfig(config_json) {
if(typeof config_json ==='string') config_json = JSON.parse(config_json);
console.log(config_json);
config = config_json;
console.log(config);
Expand Down

0 comments on commit a389fd8

Please sign in to comment.