1
Fork 0

e621: don't call find_all_posts with an order: query

This commit is contained in:
Conduitry 2020-04-13 05:07:20 -04:00
parent 951987e2bc
commit 8ec051f9c5
1 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ const make_request = (path, params) => new Promise(res => setTimeout(() => {
last_request_time = Date.now();
}, last_request_time + 500 - Date.now()));
// find all posts matching tags, iterating through pages
// find all posts matching tags, iterating through pages (only works with the default ordering of decreasing ids)
const find_all_posts = async tags => {
const all_posts = [];
for (let page = null; ;) {
@ -121,7 +121,7 @@ const augment_results = (container, posts, link_params) => {
}
// ... display children
if (document.querySelector('#has-children-relationship-preview')) {
const all_posts = await find_all_posts(`parent:${match[1]} order:id`);
const all_posts = (await find_all_posts(`parent:${match[1]}`)).reverse();
augment_results(document.querySelector('#has-children-relationship-preview'), all_posts, { q: `parent:${match[1]}` });
}
// ... display parent