Set polyfill says it is [object Object] but should say [object Set]
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 127k
- Fork
- 25.3k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 4
Mô tả
Environment
Any - you can reproduce the issue using only file
https://github.com/facebook/react-native/blob/master/Libraries/vendor/core/Set.js
and any Javascript encironment.
EDIT: Just for the bot, it is completely irrelevant:
Environment:
OS: Windows 10
Node: 10.3.0
Yarn: Not Found
npm: 6.1.0
Watchman: Not Found
Xcode: N/A
Android Studio: Version 3.1.0.0 AI-173.4720617
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.4 => 0.55.4
Description and Steps to Reproduce
Here is code that creates a simple Set object and then uses the spread operator to spread the Set's contents into a new array.
First, using an environment where the above file was executed/loaded (plus its own dependencies), and I also short-circuited the detection at the beginning that determines whether the polyfill is applied:
const s1 = new Set([1,2,3]);
console.log(Object.prototype.toString.call(s1));
Result:
[object Object]
Expected Behavior
Now for comparison a clean ES6+ environment without anything loaded, so we get a native Set implementation:
const s1 = new Set([1,2,3]);
console.log(Object.prototype.toString.call(s1));
Result:
[object Set]
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với Libraries/vendor/core/Set.js và tái hiện hành vi đã được báo cáo trong một môi trường JavaScript bằng cách sử dụng ví dụ Object.prototype.toString.call được cung cấp. So sánh kết quả của Set polyfill với kết quả của Set native; hoàn tất khi polyfill báo cáo [object Set] cho một thể hiện Set.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- mobile
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 48/100