Set polyfill says it is [object Object] but should say [object Set]
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
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]
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Libraries/vendor/core/Set.js から始め、提供されている Object.prototype.toString.call の例を使って、報告された挙動を JavaScript 環境で再現します。polyfill の Set の結果とネイティブの Set の結果を比較します; Set インスタンスに対して polyfill が [object Set] を報告すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 48/100