Limit AppOptions._hasUserOptions to only GENERIC builds

It's completely unused elsewhere, e.g. in the Firefox PDF Viewer.
This commit is contained in:
Jonas Jenwald 2023-02-10 15:37:51 +01:00
parent 903adc8708
commit 6c158da5a8
2 changed files with 5 additions and 9 deletions

View file

@ -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 };