Fix annotation color in annotator

This commit is contained in:
Ruben van de Ven 2022-06-10 13:49:12 +02:00
parent eeacb623c2
commit f8945549b0

View file

@ -310,7 +310,7 @@ class Annotator extends EventTarget {
if (tag && tag.hasOwnProperty('color') && tag.color) {
return tag.color;
}
if (tag && tag.hasOwnProperty('parent')) {
if (tag && tag.hasOwnProperty('parent') && tag.parent) {
return this.getColorForTag(tag['parent'].id);
}
return 'black';