We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9038cea commit 9df996aCopy full SHA for 9df996a
src/base.js
@@ -28,8 +28,8 @@ class pdfmake {
28
options.progressCallback = this.progressCallback;
29
options.tableLayouts = this.tableLayouts;
30
31
- const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
32
- if (typeof this.urlAccessPolicy === 'undefined' && !isBrowser) {
+ const isServer = typeof process !== 'undefined' && process?.versions?.node;
+ if (typeof this.urlAccessPolicy === 'undefined' && isServer) {
33
console.warn(
34
'No URL access policy defined. Consider using setUrlAccessPolicy() to restrict external resource downloads.'
35
);
0 commit comments