1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-23 07:26:54 +00:00

Fix problem triggered by stale history list

This commit is contained in:
Jeremy Ruston 2013-04-02 09:28:48 +01:00
parent 84504749d9
commit a17e3588a6

View File

@ -17,8 +17,11 @@ var ClassicListView = function(listWidget) {
}
ClassicListView.prototype.navigateTo = function(historyInfo) {
var listElementIndex = this.listWidget.findListElementByTitle(0,historyInfo.title),
listElementNode = this.listWidget.children[listElementIndex],
var listElementIndex = this.listWidget.findListElementByTitle(0,historyInfo.title);
if(listElementIndex === undefined) {
return;
}
var listElementNode = this.listWidget.children[listElementIndex],
targetElement = listElementNode.domNode;
// Scroll the node into view
var scrollEvent = document.createEvent("Event");