bug: race coddition while processing url

This commit is contained in:
Miroslav Šedivý 2020-02-09 00:55:01 +01:00
parent fcea47a1e8
commit bf105daadc
2 changed files with 9 additions and 7 deletions

View file

@ -45,6 +45,6 @@ logs_path = data/logs/
[system]
system_name = blog
version = 1.251
version = 1.252
debug = false
logs = false

View file

@ -6,12 +6,13 @@ $("#dd_mask").click(function(){
// Posts loading functions
var posts = {
first: false, // Is first loaded?
last: false, // Is last loaded?
loading: false, // Is something loading right now?
initialized: false, // Is initialized?
first: false, // Is first loaded?
last: false, // Is last loaded?
loading: false, // Is something loading right now?
limit: 5, // Limit posts per load
offset: 0, // Current offset
limit: 5, // Limit posts per load
offset: 0, // Current offset
filter: {
from: null, // Show posts from specified date
@ -57,7 +58,7 @@ var posts = {
load: function(){
// If is something loading now or is loading done
if(posts.loading || posts.last)
if(!posts.initialized || posts.loading || posts.last)
return ;
// Now is
@ -111,6 +112,7 @@ var posts = {
init: function(){
posts.hash_update();
posts.initialized = true;
}
};