Fix completion when there are parse errors

The type registery still need to be set on the document
This commit is contained in:
Olivier Goffart 2021-04-08 09:05:48 +02:00
parent cdcf0faa5f
commit 161a35ef5c

View file

@ -228,6 +228,7 @@ impl<'a> TypeLoader<'a> {
if diagnostics.has_error() {
let mut d = Document::default();
d.node = Some(dependency_doc.into());
d.local_registry = TypeRegister::new(&self.global_type_registry);
self.all_documents.docs.insert(path.to_owned(), d);
return;
}