Skip to content

Commit c5731a7

Browse files
authored
Merge pull request #32 from AlbertAZ1992/feat/support-for-ssr
feat: support ssr detecting
2 parents 9319488 + fc4ff54 commit c5731a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/graph/src/workers/index.worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as algorithm from './algorithm';
22
import { MESSAGE } from './constant';
33

4-
const ctx: Worker = self as any;
4+
const ctx: Worker = (typeof self !== 'undefined') ? self : {} as any;
55

66
interface Event {
77
type: string;

0 commit comments

Comments
 (0)