fix change detection bug
Tara L Andrews [Fri, 24 Feb 2012 01:11:05 +0000 (02:11 +0100)]
lib/Text/Tradition/Collation.pm

index 9ec858e..69b1a59 100644 (file)
@@ -1366,7 +1366,8 @@ sub calculate_ranks {
     # Do we need to invalidate the cached data?
     if( $self->has_cached_svg || $self->has_cached_table ) {
        foreach my $r ( $self->readings ) {
-               next if $existing_ranks{$r} && $existing_ranks{$r} == $r->rank;
+               next if defined( $existing_ranks{$r} ) 
+                       && $existing_ranks{$r} == $r->rank;
                # Something has changed, so clear the cache
                $self->_clear_cache;
                        # ...and recalculate the common readings.