Skip to content

Commit bdcff69

Browse files
committed
Trim VL template
Fixes framework7io#834
1 parent b2233d6 commit bdcff69

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/js/virtual-list.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,13 @@ var VirtualList = function (listBlock, params) {
178178
}
179179
else {
180180
if (vl.template) {
181-
vl.tempDomElement.innerHTML = vl.template(items[i], {index: index});
181+
vl.tempDomElement.innerHTML = vl.template(items[i], {index: index}).trim();
182182
}
183183
else if (vl.params.renderItem) {
184-
vl.tempDomElement.innerHTML = vl.params.renderItem(index, items[i]);
184+
vl.tempDomElement.innerHTML = vl.params.renderItem(index, items[i]).trim();
185185
}
186186
else {
187-
vl.tempDomElement.innerHTML = items[i];
187+
vl.tempDomElement.innerHTML = items[i].trim();
188188
}
189189
item = vl.tempDomElement.childNodes[0];
190190
if (vl.params.cache) vl.domCache[index] = item;

0 commit comments

Comments
 (0)