Remove duplicate Object.defineProperty loop in headless Terminal
The constructor defined property getters/setters twice on _publicOptions; the first block was immediately overwritten by the second. Align with the browser public Terminal implementation. Fixes #5935 Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
This commit is contained in:
co-authored by
Daniel Imms
parent
2ab0f10a26
commit
182ff2f635
@@ -40,15 +40,6 @@ export class Terminal extends Disposable implements ITerminalApi {
|
|||||||
};
|
};
|
||||||
|
|
||||||
for (const propName in this._core.options) {
|
for (const propName in this._core.options) {
|
||||||
Object.defineProperty(this._publicOptions, propName, {
|
|
||||||
get: () => {
|
|
||||||
return this._core.options[propName];
|
|
||||||
},
|
|
||||||
set: (value: any) => {
|
|
||||||
this._checkReadonlyOptions(propName);
|
|
||||||
this._core.options[propName] = value;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const desc = {
|
const desc = {
|
||||||
get: getter.bind(this, propName),
|
get: getter.bind(this, propName),
|
||||||
set: setter.bind(this, propName)
|
set: setter.bind(this, propName)
|
||||||
|
|||||||
Reference in New Issue
Block a user