diff --git a/web/app.js b/web/app.js index 243b16cf7..f5b6ec7df 100644 --- a/web/app.js +++ b/web/app.js @@ -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`. diff --git a/web/app_options.js b/web/app_options.js index d0cafe242..f0a5491e3 100644 --- a/web/app_options.js +++ b/web/app_options.js @@ -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 };