Skip to content

Commit

Permalink
changes as per review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rogancodes committed Dec 17, 2024
1 parent 28f2c68 commit 358972d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ruby_indexer/lib/ruby_indexer/index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ def resolve_instance_variable(variable_name, owner_name)

sig { params(variable_name: String, owner_name: String).returns(T.nilable(T::Array[Entry::ClassVariable])) }
def resolve_class_variable(variable_name, owner_name)
entries = T.cast(self[variable_name], T.nilable(T::Array[Entry::ClassVariable]))
return unless entries
entries = self[variable_name]&.grep(Entry::ClassVariable)
return unless entries&.any?

ancestors = linearized_ancestors_of(owner_name)
return if ancestors.empty?
Expand Down

0 comments on commit 358972d

Please sign in to comment.