File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,11 @@ const Opensigndrive = lazy(() => import("./pages/Opensigndrive"));
30
30
const ManageSign = lazy ( ( ) => import ( "./pages/Managesign" ) ) ;
31
31
const GenerateToken = lazy ( ( ) => import ( "./pages/GenerateToken" ) ) ;
32
32
const Webhook = lazy ( ( ) => import ( "./pages/Webhook" ) ) ;
33
- pdfjs . GlobalWorkerOptions . workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${ pdfjs . version } /pdf.worker.min.mjs` ;
33
+
34
+ pdfjs . GlobalWorkerOptions . workerSrc = new URL (
35
+ "pdfjs-dist/legacy/build/pdf.worker.min.mjs" ,
36
+ import . meta. url
37
+ ) . toString ( ) ;
34
38
const AppLoader = ( ) => {
35
39
return (
36
40
< div className = "flex justify-center items-center h-[100vh]" >
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import {
16
16
import DragElement from "./components/pdf/DragElement" ;
17
17
import TagManager from "react-gtm-module" ;
18
18
import Parse from "parse" ;
19
+ import './polyfills'
19
20
const appId = process . env . REACT_APP_APPID
20
21
? process . env . REACT_APP_APPID
21
22
: "opensign" ;
Original file line number Diff line number Diff line change
1
+ // below code is used to handle undefined Promise.withResolvers for safari
2
+ if ( typeof Promise . withResolvers === "undefined" ) {
3
+ Promise . withResolvers = function ( ) {
4
+ let resolve , reject ;
5
+ const promise = new Promise ( ( res , rej ) => {
6
+ resolve = res ;
7
+ reject = rej ;
8
+ } ) ;
9
+ return { promise, resolve, reject } ;
10
+ } ;
11
+ }
12
+
13
+ // Usage:
14
+ // const { promise, resolve, reject } = Promise.withResolvers()
15
+ // console.log(promise, resolve, reject) // Promise { <pending> } [Function (anonymous)] [Function (anonymous)]
16
+ // ... Do something async and then call resolve or reject!
You can’t perform that action at this time.
0 commit comments