Commit 22aaf83
Changed files (1)
lib
spandx
core
lib/spandx/core/dependency.rb
@@ -33,8 +33,8 @@ module Spandx
return 1 if other.nil?
score = (name <=> other.name)
- score = score.zero? ? (version <=> other&.version) : score
- score.zero? ? (path.to_s <=> other&.path.to_s) : score
+ score = score&.zero? ? (version <=> other&.version) : score
+ score&.zero? ? (path.to_s <=> other&.path.to_s) : score
end
def hash