Fix - Do not spam saveSettingsDebounced setting an item in AccountStorage (#5090)
Signed| @@ -103,6 +103,12 @@ class AccountStorage { | |||
| 103 | console.warn(`AccountStorage not ready (trying to write to ${key})`); | 103 | console.warn(`AccountStorage not ready (trying to write to ${key})`); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | const hasPropertySet = Object.hasOwn(this.#state, key) && this.#state[key] === String(value); | ||
| 107 | |||
| 108 | if (hasPropertySet) { | ||
| 109 | return; | ||
| 110 | } | ||
| 111 | |||
| 106 | this.#state[key] = String(value); | 112 | this.#state[key] = String(value); |
| 107 | saveSettingsDebounced(); | 113 | saveSettingsDebounced(); |
| 108 | } | 114 | } |