Is there a way to transform a list of errors into a tooltip-friendly format without adding commas between each item? The list is being displayed with an unwanted comma after every li element.
I suspect this issue arises from the use of
errors.map(error => ...).toString()
. Any suggestions on how I can map the strings in the errors
array without including these extra commas?
data-tip = {`
Need to address the following issues before publishing the ad:</br>
<ul>
${errors.map(error => `<li>${error}</li>`)}
</ul>
`}