Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { create } from './create'
import { run } from './run'

const createWrapper = () => {
if ('undefined' === typeof window) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any particular reason for use undefined on the left side. If not, can you please invert this order?

return null;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please add some return to the user, if not an console.error at least a console.log

}
if (!window.Worker) {
console.error('This browser does not support Workers.')
return null
Expand Down