mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-21 07:43:50 +02:00
Group calendar cringe toggle
This commit is contained in:
@@ -371,7 +371,16 @@ export async function processBulk(options) {
|
||||
try {
|
||||
while (true) {
|
||||
const result = await fn(params);
|
||||
const batchSize = result.json.length;
|
||||
let batchSize = 0;
|
||||
if (Array.isArray(result.json)) {
|
||||
batchSize = result.json.length;
|
||||
} else if (Array.isArray(result.results)) {
|
||||
batchSize = result.results.length;
|
||||
} else {
|
||||
throw new Error(
|
||||
'Invalid result format: expected an array in result.json or result.results'
|
||||
);
|
||||
}
|
||||
|
||||
if (typeof handle === 'function') {
|
||||
handle(result);
|
||||
@@ -379,6 +388,9 @@ export async function processBulk(options) {
|
||||
if (batchSize === 0) {
|
||||
break;
|
||||
}
|
||||
if (typeof result.hasNext === 'boolean' && !result.hasNext) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (N > 0) {
|
||||
totalFetched += batchSize;
|
||||
|
||||
Reference in New Issue
Block a user