Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route data maps merge differently in 0.7.0, breaking compatibility #679

Open
svdm opened this issue May 1, 2024 · 0 comments
Open

Route data maps merge differently in 0.7.0, breaking compatibility #679

svdm opened this issue May 1, 2024 · 0 comments

Comments

@svdm
Copy link

svdm commented May 1, 2024

In 0.6.0, nested map data is merged in a way that matches meta-merge, supporting ^:replace:

user> (meta-merge {:roles {:foo false :bar true}} {:roles ^:replace {:foo true}})
{:roles {:foo true}}

user> (r/routes (r/router
                 ["/context" {:roles {:foo false :bar true}}
                  ["/leaf" {:roles ^:replace {:foo true}}]]))
[["/context/leaf" {:roles {:foo true}}]]

In 0.7.0, this is no longer the case, ^:replace is not respected:

user> (r/routes (r/router
                 ["/context" {:roles {:foo false :bar true}}
                  ["/leaf" {:roles ^:replace {:foo true}}]]))
[["/context/leaf" {:roles {:foo true, :bar true}}]]

This is not documented in the changelog so I assume it's not intentional.

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

No branches or pull requests

1 participant