Skip to content

Template API V2, findLayers and path #325

@sheila-semrush

Description

@sheila-semrush

Hi everyone,

I can't get findLayers() to work with the path prop.
I'm using Template API V2.

instance.findLayers((child) => true) works fine

instance.findConnectedInstances((child) => true, { path: ['parentLayerName'], }) also works fine

but just calling instance.findLayers((child) => true, { path: ['parentLayerName'] })
or even instance.findLayers((child) => true, { path: [] })
immediately gets me an error, even before using the result in any way:
Image

Am I doing something wrong, or is there a bug in findLayers, or maybe it's described incorrectly in the docs and doesn't actually accept path?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions