We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a21fc7 commit b6437feCopy full SHA for b6437fe
packages/cli/src/prebuild.ts
@@ -497,7 +497,12 @@ export const prebuild = async (options: {
497
if (documentType === "xml") {
498
// treat first body child as root
499
const bodyInstance = instances.get(rootInstanceId);
500
- if (bodyInstance?.children?.[0].type === "id") {
+ // @todo test empty xml
501
+ if (
502
+ bodyInstance &&
503
+ bodyInstance.children.length > 0 &&
504
+ bodyInstance.children[0].type === "id"
505
+ ) {
506
rootInstanceId = bodyInstance.children[0].value;
507
}
508
// remove all unexpected components
0 commit comments