Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

BUGFIX: Don't compare node objects directly but rather compare their paths#24

Merged
breadlesscode merged 1 commit intobreadlesscode:masterfrom
gradinarufelix:bugfix-correct-node-comparison
Jul 25, 2024
Merged

BUGFIX: Don't compare node objects directly but rather compare their paths#24
breadlesscode merged 1 commit intobreadlesscode:masterfrom
gradinarufelix:bugfix-correct-node-comparison

Conversation

@gradinarufelix
Copy link
Copy Markdown
Contributor

We use the mixin of your package on document nodes, that should actually be visible in the frontend. We just don't want their path segment in their childrens path.

However, if a path is generated to these pages, it would point to the parent page. The reason is, that you do compare if the starting node is the current node when checking if to consider the uri path segment or not. But you compare the objects instead of the path. One of the objects is put in a different context and thus, even though they are the same node, the equation returns false.

I changed it by checking if the paths are the same.

@breadlesscode
Copy link
Copy Markdown
Owner

Nice optimization. Thank you :)

@breadlesscode breadlesscode merged commit 5ae630d into breadlesscode:master Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants