internal/lsp: fix regression from CL 179439
Fixes golang/go#32378 Change-Id: I7c5b794ba6137084a56e3e7bf8027a6f65819b34 Reviewed-on: https://go-review.googlesource.com/c/tools/+/179919 Run-TryBot: Rebecca Stambler <rstambler@golang.org> Reviewed-by: Ian Cottrell <iancottrell@google.com>
This commit is contained in:
parent
178e83bc9d
commit
a4e9122f10
|
@ -161,5 +161,9 @@ func (pkg *pkg) IsIllTyped() bool {
|
|||
}
|
||||
|
||||
func (pkg *pkg) GetImport(pkgPath string) source.Package {
|
||||
return pkg.imports[pkgPath]
|
||||
if imp := pkg.imports[pkgPath]; imp != nil {
|
||||
return imp
|
||||
}
|
||||
// Don't return a nil pointer because that still satisfies the interface.
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue