Sitelet https://github.com/WebReflection/linkedom/issues/259
Skip to content

Error when using with axios: "TypeError: Cannot read properties of undefined (reading 'charAt')" #259

Description

@Jhon-Idrovo

When used with axios I'm finding this error:
Screenshot 2024-03-03 at 1 50 27 PM
I did the work of following the stack trace and found where is the problem. At line 41 in https://github.com/axios/axios/blob/v1.x/lib/helpers/isURLSameOrigin.js
Screenshot 2024-03-03 at 1 56 47 PM
Seems like Axios checks if the browser is a "standard" one by creating an element. The problem is that it expects that when you create an anchor element it sets itself the pathname property when you add the href property.

I tried setting the user agent to msie or trident but the issue is still showing up

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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