Skip to content

Commit 7c53b66

Browse files
committed
give ESXM a fake type if none exists
1 parent 936be4c commit 7c53b66

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/MetaCPAN/Model.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ for my $index ( sort keys %indexes ) {
2828
sub doc {
2929
my ( $self, $doc ) = @_;
3030
my $doc_config = es_config->documents->{$doc};
31-
return $self->index( $doc_config->{index} )->type( $doc_config->{type} );
31+
return $self->index( $doc_config->{index} )
32+
->type( $doc_config->{type} // $doc_config->{index} );
3233
}
3334

3435
__PACKAGE__->meta->make_immutable;

0 commit comments

Comments
 (0)