Skip to content

Uncaught TypeError: Cannot read property 'flagname' of undefined #27

@IceCreamYou

Description

@IceCreamYou

The error has this stack trace:

TypeError: Cannot read property 'flagname' of undefined
at Object.u [as modifications] (/vendor/ldclient-js/ldclient.min.js:1:4074)
at f (/vendor/ldclient-js/ldclient.min.js:1:1443)
at /vendor/ldclient-js/ldclient.min.js:1:1412
at /vendor/ldclient-js/ldclient.min.js:11:22303
at XMLHttpRequest.<anonymous> (/vendor/ldclient-js/ldclient.min.js:11:22056)

I tracked it down, it looks like this happens because modifications gets called with an undefined newObj, which happens when updateSettings() gets called with an undefined settings parameter, which happens when requestor.fetchFlagSettings tries to get settings but the response code is not 200 or the response does not have a Content-type of application/json due to how fetchJSON handles those cases. Unfortunately I do not know what the faulty response was in this case as the error was recorded using an error-tracking service.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions