提交 f68e7383 编写于 作者: A Alex Dima

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

上级 38743ee0
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册