File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -36,14 +36,10 @@ type Props = {
36
36
type OnPasswordCallback = ( password : string | null ) => void ;
37
37
38
38
const shouldUseLegacyWorker = isMobileSafari ( ) && ! isModernSafari ( ) ;
39
- const pdfWorker : unknown = shouldUseLegacyWorker ? pdfWorkerLegacySource : pdfWorkerSource ;
39
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
40
+ const pdfWorker = shouldUseLegacyWorker ? pdfWorkerLegacySource : pdfWorkerSource ;
40
41
41
- console . log ( '[dev] isMobileSafari' , isMobileSafari ( ) ) ;
42
- console . log ( '[dev] isModernSafari' , isModernSafari ( ) ) ;
43
- console . log ( '[dev] shouldUseLegacyWorker' , shouldUseLegacyWorker ) ;
44
- console . log ( '[dev] pdfWorker' , pdfWorker ) ;
45
-
46
- pdfjs . GlobalWorkerOptions . workerSrc = URL . createObjectURL ( new Blob ( [ pdfWorkerLegacySource ] , { type : 'text/javascript' } ) ) ;
42
+ pdfjs . GlobalWorkerOptions . workerSrc = URL . createObjectURL ( new Blob ( [ pdfWorker ] , { type : 'text/javascript' } ) ) ;
47
43
48
44
const DefaultLoadingComponent = < p > Loading...</ p > ;
49
45
const DefaultErrorComponent = < p > Failed to load the PDF file :(</ p > ;
You can’t perform that action at this time.
0 commit comments