1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-01 17:53:15 +00:00

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

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++;