Update ConversionUtility.tsx (#638)

This commit is contained in:
Leendert de Borst
2025-03-05 13:15:04 +01:00
committed by Leendert de Borst
parent 1b6e220c5a
commit 6047c8f80d

View File

@@ -21,9 +21,7 @@ class ConversionUtility {
if (anchors.length > 0) {
anchors.forEach((anchor: Element) => {
// Handle target attribute
if (!anchor.hasAttribute('target')) {
anchor.setAttribute('target', '_blank');
} else if (anchor.getAttribute('target') !== '_blank') {
if (!anchor.hasAttribute('target') || anchor.getAttribute('target') !== '_blank') {
anchor.setAttribute('target', '_blank');
}