mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Handle no active editor available (#10503)
Cleaned up a stray `.unwrap()` Release Notes: - N/A
This commit is contained in:
parent
f5c2483423
commit
2a9ce3cec3
@ -1119,8 +1119,8 @@ impl AssistantPanel {
|
||||
)
|
||||
.size_full()
|
||||
.into_any_element()
|
||||
} else {
|
||||
let editor = self.active_conversation_editor().unwrap();
|
||||
} else if let Some(editor) = self.active_conversation_editor() {
|
||||
let editor = editor.clone();
|
||||
let conversation = editor.read(cx).conversation.clone();
|
||||
div()
|
||||
.size_full()
|
||||
@ -1135,6 +1135,8 @@ impl AssistantPanel {
|
||||
.children(self.render_remaining_tokens(&conversation, cx)),
|
||||
)
|
||||
.into_any_element()
|
||||
} else {
|
||||
div().into_any_element()
|
||||
},
|
||||
))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user