Skip to content

for...of iterator fail with FormData.entries() #13515

Closed
@KhaledElAnsari

Description

@KhaledElAnsari

Hello,

I was trying to iterate through the FormData values with the .entries() function using for...of iterator and it failed! I tried to do the same thing with other transpiler and it worked!

TypeScript Version: 2.0.10
Browser Used: Chrome 55.0.2883.87, FireFox 50.1.0
Code

// same simple MDN example
let formData = new FormData();
formData.append('key1', 'value1');
formData.append('key2', 'value2');
for(let pair of formData.entries()) {
   console.log(pair[0] + ": ", pair[1]); 
}

Expected behavior:

Nothing was printed in the console

Actual behavior:

key1: value1
key2: value2

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions