Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Add missing null check
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Jan 5, 2018
1 parent 300510e commit acecbf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/goPackages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function getAllPackages(): Promise<Map<string, string>> {
}

return getAllPackagesNoCache().then((pkgs) => {
if (pkgs.size === 0) {
if (!pkgs || pkgs.size === 0) {
console.log('Could not find packages. Ensure `gopkgs -format {{.Name}};{{.ImportPath}}` runs successfully.');
}
allPkgsLastHit = new Date().getTime();
Expand Down

0 comments on commit acecbf2

Please sign in to comment.