lib/nanoc/base/services/outdatedness_checker.rb in nanoc-4.11.5 vs lib/nanoc/base/services/outdatedness_checker.rb in nanoc-4.11.6

- old
+ new

@@ -154,13 +154,16 @@ contract C::None => Basic def basic @_basic ||= Basic.new(outdatedness_checker: self, reps: @reps) end - contract C_ITEM_OR_REP, Hamster::Set => C::Bool + contract C_OBJ, Hamster::Set => C::Bool def outdated_due_to_dependencies?(obj, processed = Hamster::Set.new) # Convert from rep to item if necessary obj = obj.item if obj.is_a?(Nanoc::Core::ItemRep) + + # Only items can have dependencies + return false unless obj.is_a?(Nanoc::Core::Item) # Get from cache if @objects_outdated_due_to_dependencies.key?(obj) return @objects_outdated_due_to_dependencies[obj] end