Fix for list macro

Hardens findListElementByTitle to work when the empty message is
displayed
This commit is contained in:
Jeremy Ruston
2012-11-05 15:13:51 +00:00
parent 528c62577c
commit c95618e42c
+2 -1
View File
@@ -192,7 +192,8 @@ title: tiddler title to seach for
*/
exports.findListElementByTitle = function(startIndex,title) {
while(startIndex < this.listFrame.children.length) {
if(this.listFrame.children[startIndex].listElementInfo.title === title) {
var listElementInfo = this.listFrame.children[startIndex].listElementInfo;
if(listElementInfo && listElementInfo.title === title) {
return startIndex;
}
startIndex++;