Skip to content

Commit

Permalink
little tweak for options filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
developit committed Jan 10, 2020
1 parent 4a2056e commit 4535fee
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ export default function loader () { }
loader.pitch = function (request) {
const options = loaderUtils.getOptions(this) || {};
const multi = options.multiple || options.multi || options.singleton === false;
const workerLoaderOptions = { ...options };

comlinkLoaderSpecificOptions.forEach(key => {
if (workerLoaderOptions[key]) {
delete workerLoaderOptions[key];
const workerLoaderOptions = {};
for (let i in options) {
if (comlinkLoaderSpecificOptions.indexOf(i) === -1) {
workerLoaderOptions[i] = options[i];
}
});
}

return `
import {Comlink} from 'comlinkjs';
Expand Down

0 comments on commit 4535fee

Please sign in to comment.