diff --git a/src/jquery.smoothState.js b/src/jquery.smoothState.js index b14ba7e..1ceacf4 100644 --- a/src/jquery.smoothState.js +++ b/src/jquery.smoothState.js @@ -331,7 +331,7 @@ $page = $('#' + e.state.id), page = $page.data('smoothState'), diffUrl = (page.href !== url && !utility.isHash(url, page.href)), - diffState = (e.state !== page.cache[page.href].state); + diffState = (page.cache[page.href] && e.state !== page.cache[page.href].state); if(diffUrl || diffState) { if (diffState) { @@ -835,4 +835,4 @@ /* expose the default options */ $.fn.smoothState.options = defaults; -})); \ No newline at end of file +}));