You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an optional string schema is processed, the builtInValidationMethod exits early via return.
The loop should not exit early but continue via continue.
This bug currently breaks all validation of schemas with an optional value.
functionbuiltinValidation(env,schema){consterrors=[];for(const[key,validator]ofObject.entries(schema)){try{constres=validator(key,env[key]);if(typeofres==="undefined"){deleteprocess.env[key];return;// should be continue;}process.env[key]=res;}catch(err){errors.push({ key, err });}}if(errors.length){thrownewError(errorReporter$1(errors));}}
The text was updated successfully, but these errors were encountered:
When an optional string schema is processed, the
builtInValidationMethod
exits early via return.The loop should not exit early but continue via
continue
.This bug currently breaks all validation of schemas with an optional value.
The text was updated successfully, but these errors were encountered: