Skip to content

Commit 7cef731

Browse files
committed
refactor: change code-flow
1 parent 4007e11 commit 7cef731

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/function-value-plugin.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ export default class FunctionValuePlugin {
88
const classes = serverless.classes;
99

1010
const getLambdaLogicalId = address => {
11-
if (!functions.includes(address)) {
12-
throw new classes.Error(`Function "${address}" not defined`);
11+
if (functions.includes(address)) {
12+
return naming.getLambdaLogicalId(address);
1313
}
1414

15-
return naming.getLambdaLogicalId(address);
15+
throw new classes.Error(`Function "${address}" not defined`);
1616
};
1717

1818
this.configurationVariablesSources = {

0 commit comments

Comments
 (0)