Enabled the default mode to be set when using a list of available modes.

This commit is contained in:
Owen Garland 2017-07-05 16:32:04 +02:00 committed by Meir Rotstein
parent 0b9c1f8d34
commit a9584e015f
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ JSONEditor.prototype._create = function (container, options, json) {
this.options = options || {};
this.json = json || {};
var mode = this.options.mode || 'tree';
var mode = this.options.modes ? this.options.modes[0] : this.options.mode || 'tree';
this.setMode(mode);
};