chore(security): fixes
This commit is contained in:
@@ -754,7 +754,8 @@ function renderField(field: FormField): void {
|
||||
contentEl.appendChild(img);
|
||||
} catch (error) {
|
||||
console.warn(
|
||||
`Failed to render barcode preview for field "${field.name}":`,
|
||||
'Failed to render barcode preview for field:',
|
||||
String(field.name).replace(/[\r\n]+/g, ' '),
|
||||
error
|
||||
);
|
||||
contentEl.innerHTML = `<div class="flex flex-col items-center text-center p-1 text-gray-400"><i data-lucide="qr-code" class="w-6 h-6 mb-1"></i><span class="text-[10px] leading-tight">Invalid data</span></div>`;
|
||||
@@ -2320,11 +2321,17 @@ downloadBtn.addEventListener('click', async () => {
|
||||
if (existingField) {
|
||||
radioGroup = existingField as PDFRadioGroup;
|
||||
radioGroups.set(groupName, radioGroup);
|
||||
console.log(`Using existing radio group from PDF: ${groupName}`);
|
||||
console.log(
|
||||
'Using existing radio group from PDF:',
|
||||
String(groupName).replace(/[\r\n]+/g, ' ')
|
||||
);
|
||||
} else {
|
||||
radioGroup = form.createRadioGroup(groupName);
|
||||
radioGroups.set(groupName, radioGroup);
|
||||
console.log(`Created new radio group: ${groupName}`);
|
||||
console.log(
|
||||
'Created new radio group:',
|
||||
String(groupName).replace(/[\r\n]+/g, ' ')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2690,7 +2697,8 @@ downloadBtn.addEventListener('click', async () => {
|
||||
pdfPage.drawImage(pngImage, { x, y, width, height });
|
||||
} catch (e) {
|
||||
console.warn(
|
||||
`Failed to generate barcode for field "${field.name}":`,
|
||||
'Failed to generate barcode for field:',
|
||||
String(field.name).replace(/[\r\n]+/g, ' '),
|
||||
e
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user