lib/indexers/dsl/search.rb in indexers-5.1.0 vs lib/indexers/dsl/search.rb in indexers-5.1.1
- old
+ new
@@ -13,10 +13,10 @@
super
end
end
def add_argument(name, args, options)
- if name == :query && args.any?
+ if name == :query && args.first.try(:is_a?, Symbol)
indexer = Indexers.definitions.find(args.first)
hash = self.class.new(indexer, [options], &indexer.options[:search]).to_h
@parent[name] = hash[:query]
else
super