Do not use object.deepClone on the incoming editor options (#28093)

This commit is contained in:
Alex Dima 2017-06-06 14:13:18 +02:00
parent 38743ee0fb
commit f68e7383e2

View file

@ -76,7 +76,12 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed
constructor(options: editorOptions.IEditorOptions) {
super();
this._rawOptions = objects.deepClone(options || {});
// Do a "deep clone of sorts" on the incoming options
this._rawOptions = objects.mixin({}, options || {});
this._rawOptions.scrollbar = objects.mixin({}, this._rawOptions.scrollbar || {});
this._rawOptions.minimap = objects.mixin({}, this._rawOptions.minimap || {});
this._rawOptions.find = objects.mixin({}, this._rawOptions.find || {});
this._validatedOptions = editorOptions.EditorOptionsValidator.validate(this._rawOptions, EDITOR_DEFAULTS);
this.editor = null;
this._isDominatedByLongLines = false;