[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.
This commit is contained in:
Jonas Jenwald 2023-06-24 18:33:17 +02:00
parent e9ccbd2856
commit 7667f55e45

View File

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