mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 18:25:37 +02:00
[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:
parent
e9ccbd2856
commit
7667f55e45
1 changed files with 1 additions and 2 deletions
|
@ -175,8 +175,7 @@ class DownloadManager {
|
||||||
|
|
||||||
class FirefoxPreferences extends BasePreferences {
|
class FirefoxPreferences extends BasePreferences {
|
||||||
async _readFromStorage(prefObj) {
|
async _readFromStorage(prefObj) {
|
||||||
const prefs = await FirefoxCom.requestAsync("getPreferences", prefObj);
|
return FirefoxCom.requestAsync("getPreferences", prefObj);
|
||||||
return typeof prefs === "string" ? JSON.parse(prefs) : prefs;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue