From 595eeeff6dacd72da52c4fb473d3cf4bbddc34fb Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 3 Jul 2024 10:45:41 -0400 Subject: [PATCH] TranslationParent: Don't throw on removeHandler() if none added --- chrome/content/zotero/actors/TranslationParent.jsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/actors/TranslationParent.jsm b/chrome/content/zotero/actors/TranslationParent.jsm index 38e77c6354..b30f49a7a2 100644 --- a/chrome/content/zotero/actors/TranslationParent.jsm +++ b/chrome/content/zotero/actors/TranslationParent.jsm @@ -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) {