mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-08-05 03:09:09 +02:00
actually fixed isPopState error
This commit is contained in:
@@ -60,11 +60,8 @@ $(document).ready(function() {
|
||||
app.enterRoom('');
|
||||
|
||||
// If the url is in the cache, load from cache instead
|
||||
if (cache.get(url)) { return true; }
|
||||
else {
|
||||
cache.url = ajaxify.currentPage;
|
||||
ajaxify.isPopState = false;
|
||||
}
|
||||
if (cache.get(url, callback)) { return true; }
|
||||
else { cache.url = ajaxify.currentPage; }
|
||||
|
||||
$(window).off('scroll');
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ define('ajaxifyCache', function() {
|
||||
Cache.DOM = $('#content > *').detach();
|
||||
};
|
||||
|
||||
Cache.get = function(url) {
|
||||
Cache.get = function(url, callback) {
|
||||
if (url === Cache.url && ajaxify.isPopState) {
|
||||
// Swap DOM elements
|
||||
// setTimeout(function() {
|
||||
@@ -25,6 +25,8 @@ define('ajaxifyCache', function() {
|
||||
Cache.url = ajaxify.currentPage;
|
||||
ajaxify.currentPage = url;
|
||||
|
||||
if (typeof callback === 'function') { callback(); }
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user