Skip to content

Commit

Permalink
Prevent removing the only zone
Browse files Browse the repository at this point in the history
  • Loading branch information
yinanazhou committed May 10, 2024
1 parent 88c8c1e commit 3a01da8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/ConvertMei.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export function convertToVerovio(sbBasedMei: string): string {
const facsChildren = collectFacsChildren(lastElement, []);
for (const child of facsChildren) {
const zone = zones.find(z => z.getAttribute('xml:id') == child.getAttribute('facs').slice(1));
if (zone) {
if (zone && zones.length > 1) {
zone.parentNode.removeChild(zone);
}
}
Expand Down

0 comments on commit 3a01da8

Please sign in to comment.