From 1a6477e05a76b9484d14a035d158845b55a80105 Mon Sep 17 00:00:00 2001 From: Jacob Winch Date: Thu, 21 Jan 2021 16:11:49 +0000 Subject: [PATCH] Incorporate PR feedback --- src/constructs/lambda/lambda.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/constructs/lambda/lambda.ts b/src/constructs/lambda/lambda.ts index 33ef21609..e1e74efae 100644 --- a/src/constructs/lambda/lambda.ts +++ b/src/constructs/lambda/lambda.ts @@ -39,11 +39,10 @@ export class GuLambdaFunction extends Function { constructor(scope: GuStack, id: string, props: GuFunctionProps) { const bucket = Bucket.fromBucketName(scope, `${id}-bucket`, props.code.bucket); const code = Code.fromBucket(bucket, props.code.key); - const { memorySize, timeout, ...rest } = props; super(scope, id, { - ...rest, - memorySize: defaultMemorySize(props.runtime, memorySize), - timeout: props.timeout ? props.timeout : Duration.seconds(30), + ...props, + memorySize: defaultMemorySize(props.runtime, props.memorySize), + timeout: props.timeout ?? Duration.seconds(30), code, });