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

Commit

Permalink
fix: SSR compatibility (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
BayanBennett authored Aug 22, 2020
1 parent 725e57d commit ca4a963
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/runtime/inline.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/* eslint-env browser */
/* eslint-disable no-undef, no-use-before-define, new-cap */

const URL = window.URL || window.webkitURL;

module.exports = (content, workerConstructor, workerOptions, url) => {
try {
try {
Expand All @@ -25,7 +23,8 @@ module.exports = (content, workerConstructor, workerOptions, url) => {

blob = blob.getBlob();
}


const URL = window.URL || window.webkitURL;
const objectURL = URL.createObjectURL(blob);
const worker = new window[workerConstructor](objectURL, workerOptions);

Expand Down

0 comments on commit ca4a963

Please sign in to comment.