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 issue with multiple matchers being overridden with the latest one #7

Closed
wants to merge 1 commit into from

Conversation

PJnes
Copy link

@PJnes PJnes commented Jun 26, 2022

I spotted this issue when attempting to add multiple matchers. It's difficult to spot why because I was only able to debug the compiled main.js file, but rule isn't always available when the onblur() triggers.

image

What I can't fully understand is why the index is available, but setting/getting the values directly from this.plugin.settings.rules with the index does seem to solve the issue.

@matthewhchan
Copy link
Owner

Can you check if version 1.0.12 fixes the issue you observed?

I believe 6c71ad2 may have fixed this bug. If so, the problem was that the "Add New Link" button pushed a reference to DEFAULT_NEW_RULE to this.plugin.settings.rules instead of making a copy, such that changing any newly added rule would change all of them (they all referenced the same object).

@PJnes
Copy link
Author

PJnes commented Jun 29, 2022

@matthewhchan The new version seems to have solved the issue I was seeing. Thanks!

I'll close this.

@PJnes PJnes closed this Jun 29, 2022
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