Skip to content

Commit fc4ff54

Browse files
committed
feat: support ssr
1 parent adf905b commit fc4ff54

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)