Skip to content

Commit 5cc607c

Browse files
committed
Add log message on unexpected html end tags
1 parent 6bcf092 commit 5cc607c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/svg_text_utils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,10 @@ function buildSVGText(containerNode, str) {
402402
function exitNode(type) {
403403
// A bare closing tag can't close the root node. If we encounter this it
404404
// means there's an extra closing tag that can just be ignored:
405-
if(nodeStack.length === 1) return;
405+
if(nodeStack.length === 1) {
406+
Lib.log('Ignoring unexpected end tag </' + type + '>.', str);
407+
return;
408+
}
406409

407410
var innerNode = nodeStack.pop();
408411

0 commit comments

Comments
 (0)