We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40e0caf commit 027f66dCopy full SHA for 027f66d
src/pdfjs-serverless/mocks.mjs
@@ -12,5 +12,10 @@ if (typeof globalThis.FinalizationRegistry === 'undefined') {
12
}
13
14
15
+// `navigator` is not available in serverless environments.
16
+globalThis.navigator ??= {}
17
+globalThis.navigator.platform ??= ''
18
+globalThis.navigator.userAgent ??= ''
19
+
20
// Export to ensure the mocks are not removed by tree-shaking.
21
export const mocks = true
0 commit comments