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: Undefined Custom Regex Label Causes Error #1027

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

pjkaufman
Copy link
Collaborator

Fixes #1025

There was an issue where a custom regex replace not having any kind of label (not even an empty string) would cause the Linter to fail linting on custom regex replacements because it was trying to trim the label before checking that it was not undefined.

Changes Made:

  • Check that custom regex replace label is not undefined or null before trying to trim it
  • Added a UT for this scenario

@pjkaufman pjkaufman added bug Something isn't working obsidian Obsidian specific syntax issue or feature labels Feb 28, 2024
@pjkaufman pjkaufman self-assigned this Feb 28, 2024
@pjkaufman pjkaufman merged commit b87f0e2 into platers:master Feb 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working obsidian Obsidian specific syntax issue or feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Cannot read properties of undefined (reading 'trim')
1 participant