Skip to content

Commit

Permalink
fix: syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
sdaoud committed Aug 15, 2022
1 parent 463c5eb commit fd7dc17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async function getTemplatesByName(names) {
const request = await api.getSmtpTemplates();
const { templates } = request;
return names.reduce((agg, x) => {
const template = templates?.find((t) => t.name === x);
const template = templates ? templates.find((t) => t.name === x) : false;
agg[x] = template || false;
return agg;
}, {});
Expand Down

0 comments on commit fd7dc17

Please sign in to comment.