Skip to content

Commit

Permalink
[Firefox] Simplify FirefoxPreferences._readFromStorage (PR 16583 fo…
Browse files Browse the repository at this point in the history
…llow-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.
  • Loading branch information
Snuffleupagus committed Jun 24, 2023
1 parent e9ccbd2 commit 7667f55
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions web/firefoxcom.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 7667f55

Please sign in to comment.