From 7667f55e45665bcb19a510836de80ba6417dc928 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 24 Jun 2023 18:33:17 +0200 Subject: [PATCH] [Firefox] Simplify `FirefoxPreferences._readFromStorage` (PR 16583 follow-up) Now that https://bugzilla.mozilla.org/show_bug.cgi?id=1840064 has landed in mozilla-central we can implement the final piece of clean-up for the `FirefoxPreferences._readFromStorage` method. --- web/firefoxcom.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/firefoxcom.js b/web/firefoxcom.js index 8673a3fd0..c522281b7 100644 --- a/web/firefoxcom.js +++ b/web/firefoxcom.js @@ -175,8 +175,7 @@ class DownloadManager { class FirefoxPreferences extends BasePreferences { async _readFromStorage(prefObj) { - const prefs = await FirefoxCom.requestAsync("getPreferences", prefObj); - return typeof prefs === "string" ? JSON.parse(prefs) : prefs; + return FirefoxCom.requestAsync("getPreferences", prefObj); } }