From 029cf71303c1633a7d70d3296c192ae0b46e152d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TATSUNO=20=E2=80=9CTaz=E2=80=9D=20Yasuhiro?= Date: Tue, 28 May 2024 13:01:24 +0900 Subject: [PATCH] refactor(aws-lambda): Object.hasOwn is recommended (#2831) Refer. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn --- src/adapter/aws-lambda/handler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/adapter/aws-lambda/handler.ts b/src/adapter/aws-lambda/handler.ts index 6ee9c429f..a6170d7a4 100644 --- a/src/adapter/aws-lambda/handler.ts +++ b/src/adapter/aws-lambda/handler.ts @@ -473,11 +473,11 @@ export const getProcessor = (event: LambdaEvent): EventProcessor => } const isProxyEventALB = (event: LambdaEvent): event is ALBProxyEvent => { - return Object.prototype.hasOwnProperty.call(event.requestContext, 'elb') + return Object.hasOwn(event.requestContext, 'elb') } const isProxyEventV2 = (event: LambdaEvent): event is APIGatewayProxyEventV2 => { - return Object.prototype.hasOwnProperty.call(event, 'rawPath') + return Object.hasOwn(event, 'rawPath') } export const isContentTypeBinary = (contentType: string) => {