Skip to content

[Bug] isFetch parameter is undefined #174

@condorheroblog

Description

@condorheroblog

When I use new Request with fetch to make a request, the value of request.isFetch is not true but undefined.

const req = new Request(url);
fetch(req);

By checking the source code, I saw that isFetch was added to the initialized options, but when options was reassigned, you forgot to reassign the isFetch attribute.

xhook/src/patch/fetch.ts

Lines 64 to 69 in 950c7f4

options = {
...requestObj,
...init,
headers: prevHeaders,
acceptedRequest: true,
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions