diff --git a/src/libs/translator.js b/src/libs/translator.js index cf3dfd9..d5b8381 100644 --- a/src/libs/translator.js +++ b/src/libs/translator.js @@ -55,10 +55,10 @@ export class Translator { toggle = () => { if (this._rule.transOpen === "true") { - this._rule.transOpen = "false"; + this._rule = { ...this._rule, transOpen: "false" }; this._unRegister(); } else { - this._rule.transOpen = "true"; + this._rule = { ...this._rule, transOpen: "true" }; this._register(); } };