File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
react-notion-x/src/third-party Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -237,17 +237,17 @@ export class NotionAPI {
237
237
// console.log(block, source)
238
238
239
239
if ( source ) {
240
- if ( ! source . includes ( 'secure.notion-static.com' ) ) {
241
- return [ ]
240
+ if ( source . includes ( 'secure.notion-static.com' ) || source . includes ( 'prod-files-secure' ) ) {
241
+ return {
242
+ permissionRecord : {
243
+ table : 'block' ,
244
+ id : block . id
245
+ } ,
246
+ url : source
247
+ } ;
242
248
}
243
249
244
- return {
245
- permissionRecord : {
246
- table : 'block' ,
247
- id : block . id
248
- } ,
249
- url : source
250
- }
250
+ return [ ]
251
251
}
252
252
}
253
253
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import * as React from 'react'
2
2
import { Document , Page , pdfjs } from 'react-pdf'
3
3
4
4
// ensure pdfjs can find its worker script regardless of how react-notion-x is bundled
5
- pdfjs . GlobalWorkerOptions . workerSrc = `//unpkg.com/pdfjs-dist@${ pdfjs . version } /legacy/build/pdf.worker.min.js `
5
+ pdfjs . GlobalWorkerOptions . workerSrc = `//unpkg.com/pdfjs-dist@${ pdfjs . version } /legacy/build/pdf.worker.min.mjs `
6
6
7
7
export function Pdf ( { file, ...rest } : { file : string } ) {
8
8
const [ numPages , setNumPages ] = React . useState < number > ( 0 )
You can’t perform that action at this time.
0 commit comments