We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9319488 + fc4ff54 commit c5731a7Copy full SHA for c5731a7
packages/graph/src/workers/index.worker.ts
@@ -1,7 +1,7 @@
1
import * as algorithm from './algorithm';
2
import { MESSAGE } from './constant';
3
4
-const ctx: Worker = self as any;
+const ctx: Worker = (typeof self !== 'undefined') ? self : {} as any;
5
6
interface Event {
7
type: string;
0 commit comments