Fix panic when loading hover state. (#7861)

Release Notes:

- Fixed a panic when hovering over an identifier in the editor
This commit is contained in:
Conrad Irwin 2024-02-15 14:20:10 -07:00 committed by GitHub
parent ea322e1d1c
commit a8d5864524
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -289,6 +289,7 @@ fn show_hover(
})?;
let hover_result = hover_request.await.ok().flatten();
let snapshot = this.update(&mut cx, |this, cx| this.snapshot(cx))?;
let hover_popover = match hover_result {
Some(hover_result) if !hover_result.is_empty() => {
// Create symbol range of anchors for highlighting and filtering of future requests.