# assistant: Replace an \`expect\` with a precondition check \(\#12292\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/78aaa29d5b768f09ae393bf3d3f150d9f803f3df)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 78aaa29d5b768f09ae393bf3d3f150d9f803f3df

Requested commit: 78aaa29d5b768f09ae393bf3d3f150d9f803f3df

Commit: 78aaa29d5b768f09ae393bf3d3f150d9f803f3df

Tree: 5a2e3d175491841c4d15e74911a3da75248964f7

Author: Marshall Bowers

Committer: GitHub

## Message

```
assistant: Replace an `expect` with a precondition check (#12292)

This PR replaces an `expect` with a precondition check to avoid a panic
if the `LspAdapterDelegate` isn't set when invoking a slash command.

Release Notes:

- N/A
```

## Parents

- [8450d63ed6aee8f8c5d6eb3b182e246c2b995a87](https://git.cafe/gitcafe/zed/commit/8450d63ed6aee8f8c5d6eb3b182e246c2b995a87?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/78aaa29d5b768f09ae393bf3d3f150d9f803f3df?format=markdown)
