mirror of
https://github.com/samuelthomas2774/nxapi.git
synced 2026-07-13 06:41:11 -05:00
Prevent attempting to update SplatNet 3 data for presence if not configured
How can this happen??
This commit is contained in:
parent
0d3ca779e0
commit
29b8923c5b
|
|
@ -97,6 +97,11 @@ export default class SplatNet3Monitor extends EmbeddedLoop {
|
|||
}
|
||||
|
||||
async update() {
|
||||
if (!this.config) {
|
||||
debug('Not updating SplatNet 3 monitor - not configured');
|
||||
return this.disable();
|
||||
}
|
||||
|
||||
const friends = this.cached_friends ?? await this.splatnet?.getFriendsRefetch();
|
||||
this.cached_friends = null;
|
||||
|
||||
|
|
@ -108,7 +113,7 @@ export default class SplatNet3Monitor extends EmbeddedLoop {
|
|||
this.regular_schedule = this.getSchedule(this.cached_schedules?.data.regularSchedules.nodes ?? []);
|
||||
|
||||
if (!this.regular_schedule) {
|
||||
this.cached_schedules = await this.splatnet!.getSchedules();
|
||||
this.cached_schedules = await this.splatnet?.getSchedules() ?? null;
|
||||
this.regular_schedule = this.getSchedule(this.cached_schedules?.data.regularSchedules.nodes ?? []);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user