mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-11 03:11:50 +00:00
handle packageRefs == nil
This commit is contained in:
@@ -114,6 +114,9 @@ func (s *Snapshot) String() string {
|
||||
|
||||
// NumPackages returns number of packages in snapshot
|
||||
func (s *Snapshot) NumPackages() int {
|
||||
if s.packageRefs == nil {
|
||||
return 0
|
||||
}
|
||||
return s.packageRefs.Len()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user