From 9e9b9a3bf19e280e68acd5dbaa4e42550fd9dec8 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 20 Feb 2015 16:19:53 +0000 Subject: [PATCH] Avoid navigating to an empty title Fixes #1515 --- core/modules/widgets/navigator.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index 3d6fb6aec..7809df383 100755 --- a/core/modules/widgets/navigator.js +++ b/core/modules/widgets/navigator.js @@ -143,9 +143,11 @@ NavigatorWidget.prototype.addToHistory = function(title,fromPageRect) { Handle a tm-navigate event */ NavigatorWidget.prototype.handleNavigateEvent = function(event) { - this.addToStory(event.navigateTo,event.navigateFromTitle); - if(!event.navigateSuppressNavigation) { - this.addToHistory(event.navigateTo,event.navigateFromClientRect); + if(event.navigateTo) { + this.addToStory(event.navigateTo,event.navigateFromTitle); + if(!event.navigateSuppressNavigation) { + this.addToHistory(event.navigateTo,event.navigateFromClientRect); + } } return false; };