1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-02-02 20:29:10 +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) { ClassicListView.prototype.navigateTo = function(historyInfo) {
var listElementIndex = this.listWidget.findListElementByTitle(0,historyInfo.title), var listElementIndex = this.listWidget.findListElementByTitle(0,historyInfo.title);
listElementNode = this.listWidget.children[listElementIndex], if(listElementIndex === undefined) {
return;
}
var listElementNode = this.listWidget.children[listElementIndex],
targetElement = listElementNode.domNode; targetElement = listElementNode.domNode;
// Scroll the node into view // Scroll the node into view
var scrollEvent = document.createEvent("Event"); var scrollEvent = document.createEvent("Event");