Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(runtime): 补全 window 对象的关键属性, fix #8327 #8340

Merged
merged 1 commit into from
Dec 22, 2020

Conversation

Chen-jj
Copy link
Contributor

@Chen-jj Chen-jj commented Dec 21, 2020

这个 PR 做了什么? (简要描述所做更改)

京东、支付宝小程序没有 global,会导致 React 必须的 Date、setTimeout 对象没有赋值在 global 上。
因此作一个兜底,当 window 没有这些对象时,直接赋值。

这个 PR 是什么类型? (至少选择一个)

这个 PR 涉及以下平台:

  • 微信小程序
  • 支付宝小程序
  • 百度小程序
  • 头条小程序
  • QQ 轻应用
  • 快应用平台(QuickApp)
  • Web 平台(H5)
  • 移动端(React-Native)

京东、支付宝小程序没有 global,会导致 React 必须的 Date、setTimeout 对象没有赋值在 global 上。
当 window 没有这些对象时,直接赋值。
@Chen-jj Chen-jj added the V-3 Version - 3.x label Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V-3 Version - 3.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

taro3.1.0 以及3.0.20均在编译时报 Uncaught TypeError: Cannot read property 'now' of undefined
3 participants