You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prevent relative require completion for unsaved files (#3656)
### Motivation
If a user is typing a `require_relative` in an unsaved file, we have no way of providing completion since we don't know where the user intends to save the file and the path needs to be relative to that.
This currently crashes the request, but we can simply protect the code from this and return empty completions.
### Implementation
Started returning early if the `full_path` of the URI is `nil` (which means the file is unsaved and we don't know what the file system path is).
### Automated Tests
Added a test that reproduces the same crash.
0 commit comments