diff --git a/lib/plugins/aws/package/compile/events/cloudFront/index.js b/lib/plugins/aws/package/compile/events/cloudFront/index.js index 6c44c1737..126141269 100644 --- a/lib/plugins/aws/package/compile/events/cloudFront/index.js +++ b/lib/plugins/aws/package/compile/events/cloudFront/index.js @@ -168,9 +168,7 @@ class AwsCompileCloudFrontEvents { const existingOrigin = _.find( origins, - o => - o.DomainName === origin.DomainName && - o.OriginPath === origin.OriginPath + o => o.DomainName === origin.DomainName && o.OriginPath === origin.OriginPath ); if (!existingOrigin) { diff --git a/lib/plugins/aws/package/compile/events/cloudFront/index.test.js b/lib/plugins/aws/package/compile/events/cloudFront/index.test.js index 41ff45197..fb542f65c 100644 --- a/lib/plugins/aws/package/compile/events/cloudFront/index.test.js +++ b/lib/plugins/aws/package/compile/events/cloudFront/index.test.js @@ -412,7 +412,6 @@ describe('AwsCompileCloudFrontEvents', () => { }); it('should create different origins if for different domains with the same path', () => { - awsCompileCloudFrontEvents.serverless.service.functions = { first: { name: 'first',