1
0
mirror of https://github.com/pattern-lab/patternlab-php.git synced 2025-01-18 06:38:20 +01:00

making sure, if embedding annotations, that only one result per found selector appears

This commit is contained in:
Dave Olsen 2013-10-27 21:36:18 -04:00
parent ddcbc4cab5
commit c6e3033b49

View File

@ -178,8 +178,8 @@ var annotationsPattern = {
for (comment in comments.comments) {
var item = comments.comments[comment];
var els = document.querySelectorAll(item.el);
for (var i = 0; i < els.length; ++i) {
annotationsPattern.embedComments(els[i],item.title,item.comment);
if (els.length > 0) {
annotationsPattern.embedComments(els[0],item.title,item.comment);
}
annotationsPattern.commentsEmbedded = true;
}