From: Tara L Andrews Date: Sun, 19 Apr 2015 18:32:15 +0000 (+0200) Subject: bugfix for case where duplicated reading has no language set X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9611c649f462274312555c75fc2bae356fefe2ad;p=scpubgit%2Fstemmatology.git bugfix for case where duplicated reading has no language set --- diff --git a/base/lib/Text/Tradition/Collation.pm b/base/lib/Text/Tradition/Collation.pm index 70e471a..3957762 100644 --- a/base/lib/Text/Tradition/Collation.pm +++ b/base/lib/Text/Tradition/Collation.pm @@ -744,8 +744,11 @@ sub duplicate_reading { $args{$attr->name} = $which eq 'Array' ? [ $r->$acc ] : { $r->$acc }; } - } else { - $args{$attr->name} = $r->$acc if $acc; + } elsif( $acc ) { + my $attrval = $r->$acc; + if( defined $attrval ) { + $args{$attr->name} = $attrval; + } } } # By definition the new reading will no longer be common.