diff --git a/src/annotation.js b/src/annotation.js index 68efde04e..8aed34fb3 100644 --- a/src/annotation.js +++ b/src/annotation.js @@ -274,10 +274,7 @@ function drawElements(ctx, elements, caller) { function drawSubElements(ctx, elements, caller) { for (const el of elements) { - if (!isArray(el.elements)) { - continue; - } - for (const subElem of el.elements) { + for (const subElem of el.elements || []) { if (subElem.options.drawTime === caller) { subElem.draw(ctx); }