e621: stop passing negative values to setTimeout
This commit is contained in:
parent
9acbecc4b7
commit
34f2040178
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ const make_request = (path, params) => new Promise(res => setTimeout(() => {
|
|||
xhr.open('GET', path + make_query(params), true);
|
||||
xhr.send();
|
||||
last_request_time = Date.now();
|
||||
}, last_request_time + 500 - Date.now()));
|
||||
}, Math.max(last_request_time + 500 - Date.now(), 0)));
|
||||
|
||||
// find all posts matching tags, iterating through pages (only works with the default ordering of decreasing ids)
|
||||
const find_all_posts = async tags => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue