Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

Commit

Permalink
(FACT-2498) Refactor skipping of already loaded facts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdan Irimie committed Mar 31, 2020
1 parent 32ac39c commit e7722fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/framework/core/fact_loaders/internal_fact_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def load_for_os(operating_system)
fact_name = class_name::FACT_NAME

# if fact is already loaded, skip it
next if @facts.select { |fact| fact.name == fact_name }.any?
next if @facts.any? { |fact| fact.name == fact_name }

type = fact_name.end_with?('.*') ? :legacy : :core
load_fact(fact_name, class_name, type)
Expand Down

0 comments on commit e7722fd

Please sign in to comment.