Validate Text before replacing
Validate Text before replacing

The Text variable hasn’t been verified to have content. If it doesn’t PDFMake breaks and nothing is done. We are creating a conditional before trying to replace: if the variable hasn’t been defined or is undefined we proceed to place an empty String as to avoid further processing issues, if it is defined, then we proceed to replace the string as usual.
This caused entire PDFs to break its creation.

TW-QEN/pdfmake,dennisrjohn/pdfmake,TW-QEN/pdfmake,dennisrjohn/pdfmake