Skip to content

chore: use const for the form-data loop keys in the stores - #933

Merged
edwh merged 1 commit into
TheRestartProject:developfrom
marekl11:fix/store-loop-var-to-const
Oct 11, 2026
Merged

edwh merged 1 commit into
TheRestartProject:developfrom
marekl11:fix/store-loop-var-to-const

Conversation

@marekl11

Copy link
Copy Markdown
Contributor

Putting the explanation up front, as asked on #906: this comes from a small project where a local model scans open-source repos for hygiene fixes, Claude re-checks each candidate, and I review the diff before opening a PR. This one is small and mechanical.

The form-data builders in the Vuex stores loop over the params with for (var key in params). This changes the six loops in devices.js, events.js and groups.js to for (const key in params), so key is scoped to the loop like everything else in those functions. None of the loop bodies assign to key, so behaviour is the same. ESLint is clean on the three files.

No other var loops are touched in this PR.

@sonarqubecloud

Copy link
Copy Markdown

@edwh
edwh merged commit 3a8167f into TheRestartProject:develop Oct 11, 2026
3 checks passed
edwh added a commit that referenced this pull request Oct 11, 2026
…nuxt-client

The Vuex stores are deleted on this branch, and the Nuxt stores do not use the
var loop keys the change fixes, so there is nothing to port.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants