mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
web/polyfill: fix iterator map polyfill
This commit is contained in:
parent
b63a81ba65
commit
ffa2b0fd51
1 changed files with 2 additions and 2 deletions
|
@ -14,8 +14,8 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
if (!Iterator.prototype.map) {
|
||||
Iterator.prototype.map = function(callbackFn) {
|
||||
if (!window.Iterator?.prototype.map) {
|
||||
(new Map([])).__proto__.map = function(callbackFn) {
|
||||
const output = []
|
||||
let i = 0
|
||||
for (const item of this) {
|
||||
|
|
Loading…
Add table
Reference in a new issue