Fixed CMC for empty features
Change-Id: I11ae67898ec35ee44763d249351207a9b2abfbda
diff --git a/lib/KorAP/XML/Annotation/CMC/Morpho.pm b/lib/KorAP/XML/Annotation/CMC/Morpho.pm
index 35335cd..731950a 100644
--- a/lib/KorAP/XML/Annotation/CMC/Morpho.pm
+++ b/lib/KorAP/XML/Annotation/CMC/Morpho.pm
@@ -13,7 +13,7 @@
my $content = $token->hash->{fs}->{f};
- my $array = $content->{fs}->{f};
+ my $array = $content->{fs}->{f} or return;
# In case there is only a lemma/pos ...
$array = ref $array ne 'ARRAY' ? [$array] : $array;
@@ -22,6 +22,8 @@
foreach my $f (@$array) {
+ next unless $f->{-name};
+
# pos tag
if (($f->{-name} eq 'pos') &&
($found = $f->{'#text'})) {