Skip to content

TypeError: Cannot read properties of undefined (reading 'control') #505

@predefinedx

Description

@predefinedx

Hi!

So for a fair while now, I'm getting an error in console, when using ol-layerswitcher package
image

Which points to this line in node_modules\ol-layerswitcher\dist\ol-layerswitcher.js-
image

Everything seems to work as intended, but this error in console is there at all times (even when I'm not in the part of the app, that has map involved).
Is this a problem on my end? If it is- what could cause the issue?
If it's not a common issue, can someone provide me with a working example, which does not produce this error? Giving an minimal reproduction from my side would be quite difficult, but if it will be needed, i can try to invest time to create an minimal reproduction.

Thank you all in advance!

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