Skip to content

Commit

Permalink
fixed compiling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MSzturc committed Jan 5, 2022
1 parent 13b92ee commit f9e2b51
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Plugin } from "obsidian";
import { BetterPdfSettings, BetterPdfSettingsTab } from "./settings";
import * as pdfjs from "pdfjs-dist/build/pdf.js";
import * as pdfjs from "pdfjs-dist";
import * as worker from "pdfjs-dist/build/pdf.worker.entry.js";

interface PdfNodeParameters {
range: Array<number>;
url: string;
link: boolean;
page: number | Array<number | Array<number>>;
Expand Down Expand Up @@ -101,7 +102,7 @@ export default class BetterPDFPlugin extends Plugin {
});
}

private readParameters(jsonString: any) {
private readParameters(jsonString: string) {
// "url" : [[file.pdf]] is an invalid json since it misses quotation marks in value
if (jsonString.contains("[[") && !jsonString.contains('"[[')) {
jsonString = jsonString.replace("[[", '"[[');
Expand Down

0 comments on commit f9e2b51

Please sign in to comment.