handle when optional param doesnt exist

This commit is contained in:
tjs 2022-08-16 01:08:25 -04:00
parent 2483e7cc18
commit 3c06b718c6
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ export async function sendTransaction(
await connection.getLatestBlockhash(opts.preflightCommitment)
).blockhash;
transaction.feePayer = payer.publicKey;
if (opts.additionalSigners.length > 0) {
if (opts.additionalSigners?.length > 0) {
transaction.partialSign(...opts.additionalSigners);
}