highlight crashes upon trying to iterate over a list of tags, "undefined" #12

Closed
onepremise wants to merge 1 commit from main into main
onepremise commented 2024-03-20 16:04:08 +01:00 (Migrated from github.com)

While using this great plugin for codemirror, I encountered a case where tags is being assigned "undefined". This results in the plugin crashing our editor. I was hoping we could get this fix pushed in for the next release. Please let me know if you think I'm missing anything that may result in this error. However, it still might be wise to account for "undefined" before iterating through the expected list. Thanks for all your contributions and we get a lot of great use out of your tools!!

image

While using this great plugin for codemirror, I encountered a case where tags is being assigned "undefined". This results in the plugin crashing our editor. I was hoping we could get this fix pushed in for the next release. Please let me know if you think I'm missing anything that may result in this error. However, it still might be wise to account for "undefined" before iterating through the expected list. Thanks for all your contributions and we get a lot of great use out of your tools!! ![image](https://github.com/lezer-parser/highlight/assets/1440489/c2948eb1-a0c5-44bf-8301-144b93795811)
marijnh commented 2024-03-20 20:59:51 +01:00 (Migrated from github.com)

The types forbid this function from being called with undefined, so the problem is elsewhere. Do you have a (simple) example script that triggers this error?

The types forbid this function from being called with `undefined`, so the problem is elsewhere. Do you have a (simple) example script that triggers this error?
onepremise commented 2024-03-25 20:13:32 +01:00 (Migrated from github.com)

After further evaluation and digging, we were able to locate the actual source. There was a themed plugin we were using, react-theming/storybook-addon, that was pretty old. Once we updated the dependency, the patch was no longer required. We can close this.

After further evaluation and digging, we were able to locate the actual source. There was a themed plugin we were using, react-theming/storybook-addon, that was pretty old. Once we updated the dependency, the patch was no longer required. We can close this.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lezer/highlight!12
No description provided.