Avoid mutating path array in-place

This commit is contained in:
Andrew Kingston 2024-10-02 12:57:10 +01:00
parent 93c9b229a1
commit bc96e61baf
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@
// Look up the component tree and find something that is provided by an // Look up the component tree and find something that is provided by an
// ancestor that matches our datasource. This is for backwards compatibility // ancestor that matches our datasource. This is for backwards compatibility
// as previously we could use the "closest" context. // as previously we could use the "closest" context.
for (let id of path.reverse().slice(1)) { for (let id of path.toReversed().slice(1)) {
// Check for matching view datasource // Check for matching view datasource
if ( if (
dataSource.type === "viewV2" && dataSource.type === "viewV2" &&