Skip to content

The "FindElements" calls fail to correctly initialise the returned Elements #2

@stp-ekioh

Description

@stp-ekioh

The "FindElements" functions in element.go, session.go, and shadowroot.go do not work as expected as the for loops are modifying copies of the elements rather than those in the array. In each case changing the for loops from:

	for _, element := range elements {
		element.SessionID = e.SessionID
		element.client = e.client

to:

	for index, _ := range elements {
		elements[index].SessionID = e.SessionID
		elements[index].client = e.client

appears to fix the issue.

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