use contains on AWS_EXECUTION_ENV

This commit is contained in:
Sparticuz 2023-11-16 12:44:56 -05:00
parent 1b84efe984
commit 6fe1820833
1 changed files with 2 additions and 2 deletions

View File

@ -40,8 +40,8 @@ export const isRunningInAwsLambda = () => {
export const isRunningInAwsLambdaNode20 = () => { export const isRunningInAwsLambdaNode20 = () => {
if ( if (
process.env["AWS_LAMBDA_JS_RUNTIME"] && process.env["AWS_EXECUTION_ENV"] &&
/^nodejs20.x/.test(process.env["AWS_LAMBDA_JS_RUNTIME"]) === true process.env["AWS_EXECUTION_ENV"].contains("nodejs20.x")
) { ) {
return true; return true;
} }