Limit AppOptions._hasUserOptions
to only GENERIC builds
It's completely unused elsewhere, e.g. in the Firefox PDF Viewer.
This commit is contained in:
parent
903adc8708
commit
6c158da5a8
@ -268,10 +268,7 @@ const PDFViewerApplication = {
|
||||
* @private
|
||||
*/
|
||||
async _readPreferences() {
|
||||
if (
|
||||
typeof PDFJSDev === "undefined" ||
|
||||
PDFJSDev.test("!PRODUCTION || GENERIC")
|
||||
) {
|
||||
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
||||
if (AppOptions.get("disablePreferences")) {
|
||||
// Give custom implementations of the default viewer a simpler way to
|
||||
// opt-out of having the `Preferences` override existing `AppOptions`.
|
||||
|
@ -404,13 +404,12 @@ class AppOptions {
|
||||
static remove(name) {
|
||||
delete userOptions[name];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
static _hasUserOptions() {
|
||||
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
||||
AppOptions._hasUserOptions = function () {
|
||||
return Object.keys(userOptions).length > 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export { AppOptions, compatibilityParams, OptionKind };
|
||||
|
Loading…
x
Reference in New Issue
Block a user