diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/PDFBox.tsx | 2 | ||||
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index 0f5cc0fa9..af996b3d8 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -57,7 +57,7 @@ export class PDFBox extends DocAnnotatableComponent<FieldViewProps, PdfDocument> componentDidMount() { const pdfUrl = Cast(this.dataDoc[this.props.fieldKey], PdfField); if (pdfUrl instanceof PdfField) { - Pdfjs.getDocument(pdfUrl.url.pathname).promise.then(pdf => runInAction(() => this._pdf = pdf)); + Pdfjs.getDocument(pdfUrl.url.href).promise.then(pdf => runInAction(() => this._pdf = pdf)); } this._selectReactionDisposer = reaction(() => this.props.isSelected(), () => { diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 253968443..41825cda7 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -137,7 +137,7 @@ export class PDFViewer extends DocAnnotatableComponent<IViewerProps, PdfDocument const properPath = Utils.prepend(`/files/pdfs/${matches[0]}`); console.log(properPath); console.log(`The two (url and proper path) ${url === properPath ? "were" : "were not equal"}`); - if (url !== properPath) { + if (!properPath.includes(url)) { const proto = Doc.GetProto(Document); proto[this.props.fieldKey] = new PdfField(properPath); proto[backup] = url; |