mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-31 07:16:17 +00:00
Extra tasks support
This commit is contained in:
parent
88a97ada56
commit
cccdef2706
@ -119,16 +119,20 @@ module.exports = exports = class Page extends File {
|
||||
res[camelCased] = true;
|
||||
return res;
|
||||
}, {});
|
||||
|
||||
}
|
||||
|
||||
tasks () {
|
||||
if (!isObject(this.tweets)) return [];
|
||||
|
||||
return Object.values(this.tweets)
|
||||
.map((t) => t.media)
|
||||
.flat()
|
||||
.map((m) => ({ ...m, action: actions.fetch, output: m.output }));
|
||||
const tasks = [];
|
||||
if (isObject(this.tweets)) {
|
||||
tasks.push(...(
|
||||
Object.values(this.tweets)
|
||||
.map((t) => t.media)
|
||||
.flat()
|
||||
.map((m) => ({ ...m, action: actions.fetch, output: m.output }))
|
||||
));
|
||||
}
|
||||
if (this._tasks) tasks.push(...this._tasks);
|
||||
return tasks;
|
||||
}
|
||||
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user