sub _stringify_element {
my( $hash, $key ) = @_;
- my $str = join( ', ', @{$hash->{$key}} );
- $hash->{$key} = $str;
+ return undef unless exists $hash->{$key};
+ if( ref( $hash->{$key} ) eq 'ARRAY' ) {
+ my $str = join( ', ', @{$hash->{$key}} );
+ $hash->{$key} = $str;
+ }
}
=head2 graphsvg