Skip to content

Don't return nil for missing objects from parser cache

Douwe Maan requested to merge dm-fix-parser-cache into master

Fixes regression introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11788

[1] pry(main)> cache = {}
=> {}
[2] pry(main)> ids = [1,2,3]
=> [1, 2, 3]
[3] pry(main)> cache.values
=> []
[4] pry(main)> cache.values_at(*ids)
=> [nil, nil, nil]

grouped_objects_for_nodes would blow up in collection_objects.index_by(&:id) when collection_objects_for_ids returns nils.

Merge request reports