Isn't outerArray gonna be empty except for the last element, which will contain an array?
You also don't need a new Promise here either- fetch already returns a Promise. If you return the innerArray inside the then() clause then it'll be the same as the Promise doing resolve(innerArray)
https://github.com/bj2jung/Yahoo-Fantasy-Basketball-Player-Comparison-Chrome-Extension/blob/c28b8e0d537ca6aae359a690b7ac310399da49c2/content.js#L530
Isn't
outerArray
gonna be empty except for the last element, which will contain an array?You also don't need a new Promise here either- fetch already returns a Promise. If you return the
innerArray
inside thethen()
clause then it'll be the same as the Promise doingresolve(innerArray)