Skip to content

Commit fd55af9

Browse files
committed
fix(client-sdk): fix wx process hack
1 parent 36002b1 commit fd55af9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/client-sdk/src/index.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
* hack `process` missing for wechat miniprogram
33
*/
44
declare const wx: any
5-
if (wx) {
6-
(globalThis as any).process = {}
5+
if (wx && !process) {
6+
(globalThis as any).process = {
7+
env: {}
8+
}
79
console.info('hacked for `process` missing for wechat miniprogram')
810
}
911

0 commit comments

Comments
 (0)