TranslationParent: Don't throw on removeHandler() if none added

This commit is contained in:
Abe Jellinek 2024-07-03 10:45:41 -04:00
parent 3e6cfaf9ac
commit 595eeeff6d

View file

@ -39,7 +39,7 @@ const TranslationManager = new class {
removeHandler(id, name, handler) {
this._registeredRemoteTranslates.get(id).handlers[name]
= this._registeredRemoteTranslates.get(id).handlers[name].filter(h => h !== handler);
= this._registeredRemoteTranslates.get(id).handlers[name]?.filter(h => h !== handler);
}
clearHandlers(id, name) {