Skip to content

Commit

Permalink
WorkerFS should report true if in Worker context w/o subworkers.
Browse files Browse the repository at this point in the history
I check for the importScripts function.

Fixing jvilk#143.
  • Loading branch information
John Vilk committed Aug 18, 2016
1 parent d1f2fb5 commit 81f3d32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/WorkerFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ export default class WorkerFS extends file_system.BaseFileSystem implements file
}

public static isAvailable(): boolean {
return typeof Worker !== 'undefined';
return typeof(importScripts) !== 'undefined' || typeof(Worker) !== 'undefined';
}

public getName(): string {
Expand Down

0 comments on commit 81f3d32

Please sign in to comment.