fix: guard against undefined snapshot.skills in applySkillEnvOverridesFromSnapshot
snapshot.skills can be undefined when a session is reset during an API rate-limit cooldown, causing a TypeError crash that compounds the original rate-limit issue. Use nullish coalescing (snapshot.skills ?? []) to safely skip iteration when skills is not populated.
This commit is contained in:
parent
d17a1f387b
commit
20da030e1a
@ -71,7 +71,7 @@ export function applySkillEnvOverridesFromSnapshot(params: {
|
||||
}
|
||||
const updates: EnvUpdate[] = [];
|
||||
|
||||
for (const skill of snapshot.skills) {
|
||||
for (const skill of snapshot.skills ?? []) {
|
||||
const skillConfig = resolveSkillConfig(config, skill.name);
|
||||
if (!skillConfig) {
|
||||
continue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user