mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-08 23:20:03 +00:00
Fix for list macro
Hardens findListElementByTitle to work when the empty message is displayed
This commit is contained in:
parent
528c62577c
commit
c95618e42c
@ -192,7 +192,8 @@ title: tiddler title to seach for
|
|||||||
*/
|
*/
|
||||||
exports.findListElementByTitle = function(startIndex,title) {
|
exports.findListElementByTitle = function(startIndex,title) {
|
||||||
while(startIndex < this.listFrame.children.length) {
|
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;
|
return startIndex;
|
||||||
}
|
}
|
||||||
startIndex++;
|
startIndex++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user