fix(#209): Fixes issue with options not being preserved when individually set. (#211)

This commit is contained in:
Jamie Peabody
2024-10-11 20:47:58 +01:00
committed by GitHub
parent 86593de7d0
commit 4cd8897c6b
4 changed files with 55 additions and 45 deletions

View File

@@ -449,7 +449,6 @@ CodeMirrorDiffView.prototype.bind = function(container) {
ev.preventDefault();
return;
}
const ed = this.editor[side];
// See if the user clicked the line number of a difference:
let found = false;
for (let i = 0; i < this.changes.length; ++i) {

View File

@@ -122,13 +122,11 @@ class Mergely {
const colors = dom.getColors(this.el);
this._options = {
...defaultOptions,//lgpl
...this._initOptions,
...(this._options || this._initOptions),
...options//lgpl-separate-notice
};
this._viewOptions = {
...defaultOptions,
...this._initOptions,
...options,
...this._options,
_colors: colors
};
}