Though sparkpost is invoked, the error cases are not handled. This should be altered for a well-functioning system.
Currently, a mismatch between emailsTo's length and numLinks can cause an out of bounds array access. This should be remedied. A simple fix would be just accepting an emailsTo parameter with the number of links inferred from the length.
Though sparkpost is invoked, the error cases are not handled. This should be altered for a well-functioning system.
Currently, a mismatch between
emailsTo
's length andnumLinks
can cause an out of bounds array access. This should be remedied. A simple fix would be just accepting anemailsTo
parameter with the number of links inferred from the length.