fix(environment-variable): guard refresh against missing or stale variables

Add early return in refresh() to skip sync operations if the environment variable no longer exists or is not fresh, preventing errors when refreshing stale or deleted variables.
This commit is contained in:
Andras Bacsai 2026-03-23 10:52:59 +01:00
parent f8f27fff13
commit 3d5fee4d36

View file

@ -98,6 +98,9 @@ public function getResourceProperty()
public function refresh()
{
if (! $this->env->exists || ! $this->env->fresh()) {
return;
}
$this->syncData();
$this->checkEnvs();
}