Commit 76ce2887 authored by Adrien Pavie's avatar Adrien Pavie

Bug fix

parent 4a97a083
......@@ -406,7 +406,7 @@ var Main = function(divId, mode, config) {
* @param folder The folder containing JSON configuration files
*/
Main.prototype._initConfig = function(config) {
var overwriteStyle = (config.styles && config.styles.length > 0) ? config.styles : null;
var overwriteStyle = (config && config.styles && config.styles.length > 0) ? config.styles : null;
//Update default config according to given one
$.extend(true, this.config, config);
if(overwriteStyle) { this.config.styles = overwriteStyle; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment