Skip to content

Fetch : talk about response.headers.map in the doc + iterator exception #13450

Closed
@ancyrweb

Description

@ancyrweb

I'm using Fetch in my project and i've come to realise that when using standard developer mode, I cannot use Iterator to loop through the entries of the Header object, but a "map" object is provided in the header. When i'm starting the JS Debugger with Chrome suddenly the entries iterator works. Maybe the fetch API relies on Chrome when Debugging and Native when it's not, but it's been weird to track the Iterator exception because my first feeling was that no matter the context (Chrome or Native) the fetch API is the same.

The error I get when trying to make a for...of is : "TypeError : undefined is not a function (evaluating '_iterator[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']()').

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions