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

Commit ca4a963

Browse files
authored
fix: SSR compatibility (#284)
1 parent 725e57d commit ca4a963

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/runtime/inline.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/* eslint-env browser */
22
/* eslint-disable no-undef, no-use-before-define, new-cap */
33

4-
const URL = window.URL || window.webkitURL;
5-
64
module.exports = (content, workerConstructor, workerOptions, url) => {
75
try {
86
try {
@@ -25,7 +23,8 @@ module.exports = (content, workerConstructor, workerOptions, url) => {
2523

2624
blob = blob.getBlob();
2725
}
28-
26+
27+
const URL = window.URL || window.webkitURL;
2928
const objectURL = URL.createObjectURL(blob);
3029
const worker = new window[workerConstructor](objectURL, workerOptions);
3130

0 commit comments

Comments
 (0)