Skip to content

Commit 4c95110

Browse files
committed
make sure the user has input an api key
1 parent 834b4dd commit 4c95110

File tree

1 file changed

+9
-3
lines changed
  • packages/react-email/src/commands/resend

1 file changed

+9
-3
lines changed

packages/react-email/src/commands/resend/setup.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@ export async function resendSetup() {
1717
message: 'Enter your API Key (make sure it has "Full Access")',
1818
});
1919

20-
conf.set('resendApiKey', apiKey);
21-
console.info(`${logSymbols.success} Resend integration successfully set up`);
22-
console.info(`You can always remove it with ${styleText('green', 'npx react-email@latest resend reset')}`);
20+
if (apiKey?.trim().length > 0) {
21+
conf.set('resendApiKey', apiKey);
22+
console.info(
23+
`${logSymbols.success} Resend integration successfully set up`,
24+
);
25+
console.info(
26+
`You can always remove it with ${styleText('green', 'npx react-email@latest resend reset')}`,
27+
);
28+
}
2329
}

0 commit comments

Comments
 (0)