Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit ff47154

Browse files
committed
making sure annotations can be added to the pattern container div on the style guide
1 parent 6fd5195 commit ff47154

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/styleguide/js/annotations-pattern.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ var annotationsPattern = {
110110

111111
var parentEl;
112112

113-
if (el.parentNode.classList.contains("sg-pattern")) {
113+
if (el.classList.contains("sg-pattern")) {
114+
return el;
115+
} else if (el.parentNode.classList.contains("sg-pattern")) {
114116
return el.parentNode;
115117
} else {
116118
parentEl = annotationsPattern.findParent(el.parentNode);

0 commit comments

Comments
 (0)