diff --git a/lib/MetaCPAN/ES.pm b/lib/MetaCPAN/ES.pm index 266cda3..e37b485 100644 --- a/lib/MetaCPAN/ES.pm +++ b/lib/MetaCPAN/ES.pm @@ -29,7 +29,7 @@ sub new ( $class, %args ) { nodes => [$config_node], ), index => $index, - ( $args{type} ? ( type => $args{type} ) : () ), + type => ( $args{type} ? $args{type} : $index ), }, $class; }