Skip to content

Commit

Permalink
Fix strip target element inconsistent
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenny-Hui committed Aug 8, 2024
1 parent 7ad9b31 commit 76e52f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/layout/Project.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
let xmlDoc = exportXliff(files);
if(exportOptions.stripEmptyTarget) {
for(let targetElem of xmlDoc.getElementsByTagName("target")) {
for(let targetElem of [...xmlDoc.getElementsByTagName("target")]) {
console.log(targetElem.textContent + "_" + targetElem.textContent.length)
if(targetElem.textContent.length == 0) targetElem.remove();
}
}
Expand Down

0 comments on commit 76e52f4

Please sign in to comment.