diff --git a/js/widgets/popup.js b/js/widgets/popup.js index ca2f0dd5f7c..d9fee866b2b 100644 --- a/js/widgets/popup.js +++ b/js/widgets/popup.js @@ -425,11 +425,14 @@ define( [ "jquery", } else { parsedDst = data.toPage.jqmData( "url" ); } - toUrl = parsedDst.pathname + parsedDst.search + parsedDst.hash; - if ( self._myUrl !== toUrl ) { - self._onHashChange( true ); - } + if (parsedDst) { + toUrl = parsedDst.pathname + parsedDst.search + parsedDst.hash; + + if ( self._myUrl !== toUrl ) { + self._onHashChange( true ); + } + } }); if ( $.mobile.hashListeningEnabled ) { var activeEntry = $.mobile.urlHistory.getActive(),