Closed ebraminio closed 3 years ago
Totals | |
---|---|
Change from base Build 765171076: | 0.0% |
Covered Lines: | 36 |
Relevant Lines: | 36 |
Ah, you're right that the spread isn't necessary, thanks 🎉
I added 84ac195 because forEach
is "old school" now that we have for...of
, not because there was a functional problem with it.
Released in 1.2.1.
Just to illustrate the issue better,
let text = '👌'; for (let i = 0; i < text.length; i += 1) { console.log(text[i]); } // FAIL: prints two incorrect characters [...text].forEach(c => console.log(c)) // PASS: prints one character for (const c of [...text]) { console.log(c); } // PASS for (const c of text) { console.log(c); } // PASS
Also curious to know why https://github.com/papandreou/subset-font/commit/84ac1955987f5197b0f037d6cf0dde1622d73397 was needed yet this won't revert that and just simplifies it.