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 {
237237 // console.log(block, source)
238238
239239 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+ } ;
242248 }
243249
244- return {
245- permissionRecord : {
246- table : 'block' ,
247- id : block . id
248- } ,
249- url : source
250- }
250+ return [ ]
251251 }
252252 }
253253
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import * as React from 'react'
22import { Document , Page , pdfjs } from 'react-pdf'
33
44// 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 `
66
77export function Pdf ( { file, ...rest } : { file : string } ) {
88 const [ numPages , setNumPages ] = React . useState < number > ( 0 )
You can’t perform that action at this time.
0 commit comments