modify translator.toggle func

This commit is contained in:
Gabe Yuan
2023-08-09 11:00:27 +08:00
parent 04ec4ad12b
commit 5b38c38feb

View File

@@ -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();
}
};