Skip to content
This repository was archived by the owner on Sep 28, 2020. It is now read-only.

Commit 81f982f

Browse files
authored
fix: fails to get html file content (#105)
* fix: fails to get html file content pass bound getFileContent to prepareHTML load callbacl * build: upgrade node version * chore: update package lock file * chore: lt node version
1 parent 4c04b22 commit 81f982f

File tree

3 files changed

+59
-125
lines changed

3 files changed

+59
-125
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10
1+
10.16.0

package-lock.json

Lines changed: 57 additions & 123 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/features/extend-file-preview-html.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ExtendFilePreviewHTML extends ExtendFilePreview {
2020
base: path.dirname(this.pathToBlob(filePath)),
2121
folder: path.dirname(filePath),
2222
html: fileContent.replace(/<a/g, `<a target="_blank"`),
23-
load: this.getFileContent,
23+
load: this.getFileContent.bind(this),
2424
});
2525
}
2626
}

0 commit comments

Comments
 (0)