Skip to content

fix: avoid mutating caller-provided node configurations - #364

Merged
tharropoulos merged 2 commits into
typesense:masterfrom
tharropoulos:config-copy
Aug 31, 2026
Merged

fix: avoid mutating caller-provided node configurations#364
tharropoulos merged 2 commits into
typesense:masterfrom
tharropoulos:config-copy

Conversation

@tharropoulos

@tharropoulos tharropoulos commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Change Summary

  • copy each entry in nodes before setDefaultPathInNode/setDefaultPortInNode write defaults, so caller objects stay untouched
  • shallow-copy nearestNode before applying the same defaults

PR Checklist

@tharropoulos tharropoulos changed the title Config t fix: avoid mutating caller-provided node configurations Aug 31, 2026
@tharropoulos
tharropoulos merged commit 0215985 into typesense:master Aug 31, 2026
1 check passed
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.

1 participant