Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions packages/notion-client/src/notion-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,17 +237,17 @@ export class NotionAPI {
// console.log(block, source)

if (source) {
if (!source.includes('secure.notion-static.com')) {
return []
if (source.includes('secure.notion-static.com') || source.includes('prod-files-secure')) {
return {
permissionRecord: {
table: 'block',
id: block.id
},
url: source
};
}

return {
permissionRecord: {
table: 'block',
id: block.id
},
url: source
}
return []
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/react-notion-x/src/third-party/pdf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'
import { Document, Page, pdfjs } from 'react-pdf'

// ensure pdfjs can find its worker script regardless of how react-notion-x is bundled
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/legacy/build/pdf.worker.min.js`
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/legacy/build/pdf.worker.min.mjs`

export function Pdf({ file, ...rest }: { file: string }) {
const [numPages, setNumPages] = React.useState<number>(0)
Expand Down
Loading