Skip to content

Commit

Permalink
fix(client-sdk): fix wx process hack
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Sep 22, 2022
1 parent 36002b1 commit fd55af9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/client-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
* hack `process` missing for wechat miniprogram
*/
declare const wx: any
if (wx) {
(globalThis as any).process = {}
if (wx && !process) {
(globalThis as any).process = {
env: {}
}
console.info('hacked for `process` missing for wechat miniprogram')
}

Expand Down

0 comments on commit fd55af9

Please sign in to comment.