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: 修复window被proxy,导致作用域错误 #106

Merged
merged 2 commits into from
Sep 2, 2022

Conversation

Heath1998
Copy link
Contributor

@Heath1998 Heath1998 commented Aug 30, 2022

  • 提交符合commit规范
  • 文档更改
  • 测试用例添加
  • npm run test通过
详细描述
  • 特性 修复 window 被 proxy 代理后,引起的作用域绑定错误。
  • 关联issue issue #102

@Xchen1995
Copy link
Contributor

存储用个set不可以嘛.. 毕竟这个true也不需要使用

}
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对于已经 算过的 boundValue 也可以放到缓存中,下次不用再bind,直接从缓存拿?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

所以这个地方的 weakmap key 为原始的函数,value为 bind 之后的函数 boundValue

@yiludege yiludege merged commit 4895297 into Tencent:master Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants