Skip to content

Commit 6c66070

Browse files
author
Aleksander Dikanski
committed
Resolve linting issues
1 parent f502a95 commit 6c66070

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/stackops/apiGateway.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ module.exports = function(currentTemplate, aliasStackTemplates, currentAliasStac
225225
const authorizerType = _.get(authorizer, 'Properties.Type');
226226
if (authorizerType === 'TOKEN' || authorizerType === 'REQUEST') {
227227
const uriParts = authorizer.Properties.AuthorizerUri['Fn::Join'][1];
228-
const funcIndex = _.findIndex(uriParts, part =>
229-
_.has(part, 'Fn::GetAtt') || (part.startsWith && part.startsWith('arn:aws:lambda')));
228+
const funcIndex = _.findIndex(uriParts, part =>
229+
_.has(part, 'Fn::GetAtt') || _.startsWith(part, 'arn:aws:lambda'));
230230

231231
// Use the SERVERLESS_ALIAS stage variable to determine the called function alias
232232
uriParts.splice(funcIndex + 1, 0, ':${stageVariables.SERVERLESS_ALIAS}');
@@ -288,7 +288,7 @@ module.exports = function(currentTemplate, aliasStackTemplates, currentAliasStac
288288
}
289289

290290
// Add dependency on function version
291-
permission.DependsOn = [ versionName, aliasName ].filter(name => name);
291+
permission.DependsOn = _.compact([ versionName, aliasName ]);
292292

293293
delete stageStack.Resources[name];
294294
});

0 commit comments

Comments
 (0)