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:
parent
f8f27fff13
commit
3d5fee4d36
1 changed files with 3 additions and 0 deletions
|
|
@ -98,6 +98,9 @@ public function getResourceProperty()
|
|||
|
||||
public function refresh()
|
||||
{
|
||||
if (! $this->env->exists || ! $this->env->fresh()) {
|
||||
return;
|
||||
}
|
||||
$this->syncData();
|
||||
$this->checkEnvs();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue