The code looks as following:
const documentSigner = `${parameters.signor.surname} ${parameters.signor.name} ${parameters.signor.patronymic || ''}`;
As you can see, if there is patronymic everything will be fine, but if there is not, there will be extra space.
How to manage with this?