Skip to content

Commit

Permalink
Merge pull request #596 from worgho2/fix/private-url-signing
Browse files Browse the repository at this point in the history
  • Loading branch information
transitive-bullshit authored Jan 10, 2025
2 parents 3991343 + 29111e5 commit 4985e0e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
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

0 comments on commit 4985e0e

Please sign in to comment.