소스 검색

Change service to manage <front> element in XML files

Federica 2 년 전
부모
커밋
d206b5c854
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/app/services/xml-parsers/structure-xml-parser.service.ts

+ 1 - 1
src/app/services/xml-parsers/structure-xml-parser.service.ts

@@ -35,7 +35,7 @@ export class StructureXmlParserService {
       };
     }
 
-    const frontPages = frontPbs.length === 0 && this.isMarkedAsOrigContent(front)
+    const frontPages = frontPbs.length === 0 && front && this.isMarkedAsOrigContent(front)
       ? [this.parseSinglePage(doc, front, 'page_front', this.frontTagName)]
       : frontPbs.map((pb, idx, arr) => this.parseDocumentPage(doc, pb as HTMLElement, arr[idx + 1] as HTMLElement, this.frontTagName));