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
|
* @private
|
||||||
*/
|
*/
|
||||||
async _readPreferences() {
|
async _readPreferences() {
|
||||||
if (
|
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
||||||
typeof PDFJSDev === "undefined" ||
|
|
||||||
PDFJSDev.test("!PRODUCTION || GENERIC")
|
|
||||||
) {
|
|
||||||
if (AppOptions.get("disablePreferences")) {
|
if (AppOptions.get("disablePreferences")) {
|
||||||
// Give custom implementations of the default viewer a simpler way to
|
// Give custom implementations of the default viewer a simpler way to
|
||||||
// opt-out of having the `Preferences` override existing `AppOptions`.
|
// opt-out of having the `Preferences` override existing `AppOptions`.
|
||||||
|
@ -404,13 +404,12 @@ class AppOptions {
|
|||||||
static remove(name) {
|
static remove(name) {
|
||||||
delete userOptions[name];
|
delete userOptions[name];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
||||||
* @ignore
|
AppOptions._hasUserOptions = function () {
|
||||||
*/
|
|
||||||
static _hasUserOptions() {
|
|
||||||
return Object.keys(userOptions).length > 0;
|
return Object.keys(userOptions).length > 0;
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export { AppOptions, compatibilityParams, OptionKind };
|
export { AppOptions, compatibilityParams, OptionKind };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user