detect if page title is defined in tempalte

This commit is contained in:
amitm02
2018-10-02 17:52:55 +03:00
parent ffdcc7baca
commit f3aa6a9203
2 changed files with 19 additions and 5 deletions

View File

@ -12,7 +12,7 @@ fs.readFile(filePath, (err, data) => {
importDotx.extract(data).then((templateDocument) => {
// This any needs fixing
const sectionProps = {
titlePage: true,
titlePage: templateDocument.titlePageIsDefined,
} as any;
const doc = new Document(undefined, sectionProps, {