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

Fix error where name of node is also the name of a parent (but not root) node #10

Merged
merged 1 commit into from
May 29, 2024

Conversation

lexiccn
Copy link
Contributor

@lexiccn lexiccn commented May 29, 2024

This fixes errors in nodes with this format: root.namexyz.name

This was caused by use of currentPath.replace(node) where this path, for example, would become: rootxyz as .name would be replaced with an empty string.

All uses of replace were replaced with directly replacing currentPath with a substring, this may also be slightly more efficient given substrings were created for replacement anyway, skipping a step!

Tested by copying the class to plugin where the bug was discovered to ensure no mistakes, although it is a very simple change.

@LlmDl LlmDl merged commit f492a1d into TownyAdvanced:main May 29, 2024
1 check passed
@LlmDl LlmDl added this to the 1.0.2 milestone May 29, 2024
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