fix: fix an attempt to use null value in DocumentStore.resolveImport

caused by missing files or weird file path starting
e.g.
```
pub const abc = @import(".////abc.zig");
```
This commit is contained in:
nullptrdevs 2022-08-25 15:52:07 -07:00
parent 54be6d92c6
commit 481903e72a

View File

@ -953,7 +953,7 @@ pub fn resolveImport(self: *DocumentStore, handle: *Handle, import_str: []const
for (handle.imports_used.items) |uri| {
if (std.mem.eql(u8, uri, final_uri)) {
return self.getHandle(final_uri).?;
return self.getHandle(final_uri) orelse return null;
}
}
// The URI must be somewhere in the import_uris or the package uris