Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash in repositionTooltips when there are no tooltips
FIX: Fix an issue that caused `repositionTooltips` to crash when it was called on an editor without tooltips. See https://discuss.codemirror.net/t/typeerror-cannot-read-properties-of-null-reading-maybemeasure/7094
- Loading branch information
dc7509a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these not the same semantically? I'm curious how this prevents a crash over the previous behavior.
dc7509a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
a?.b()
will not crash on the property dereference, but still try to call the resulting undefined value.