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

没有办法clone Symbol属性的值 #8

Open
YuArtian opened this issue Oct 5, 2019 · 3 comments
Open

没有办法clone Symbol属性的值 #8

YuArtian opened this issue Oct 5, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@YuArtian
Copy link

YuArtian commented Oct 5, 2019

  var a = {
    [Symbol('a')]: 'a'
  }
  var newA = cloneForce(a)
  console.log('a',a);
  console.log('newA',newA);

结果:
微信截图_20191005191906

@yanhaijing
Copy link
Member

symbol是值类型,不是对象类型吧

@YuArtian
Copy link
Author

YuArtian commented Oct 6, 2019

symbol是值类型,不是对象类型吧
@yanhaijing
额。。是啊
我是想说 对象上有symbol值做属性名的话 也要拷贝过来吧

@yanhaijing
Copy link
Member

@YuArtian 是的,看来是个bug

@yanhaijing yanhaijing added the bug Something isn't working label Oct 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants