@@ -567,11 +567,12 @@ export class SuperDoc extends EventEmitter {
567567 commentsType,
568568 exportedName,
569569 additionalFiles = [ ] ,
570- additionalFileNames = [ ]
570+ additionalFileNames = [ ] ,
571+ isFinalDoc = false ,
571572 } = { } ) {
572573 // Get the docx files first
573574 const baseFileName = exportedName ? cleanName ( exportedName ) : cleanName ( this . config . title ) ;
574- const docxFiles = await this . exportEditorsToDOCX ( { commentsType } ) ;
575+ const docxFiles = await this . exportEditorsToDOCX ( { commentsType, isFinalDoc } ) ;
575576 const blobsToZip = [ ...additionalFiles ] ;
576577 const filenames = [ ...additionalFileNames ] ;
577578
@@ -592,7 +593,7 @@ export class SuperDoc extends EventEmitter {
592593 }
593594 } ;
594595
595- async exportEditorsToDOCX ( { commentsType } = { } ) {
596+ async exportEditorsToDOCX ( { commentsType, isFinalDoc } = { } ) {
596597 const comments = [ ] ;
597598 if ( commentsType !== 'clean' ) {
598599 comments . push ( ...this . commentsStore ?. translateCommentsForExport ( ) ) ;
@@ -602,7 +603,7 @@ export class SuperDoc extends EventEmitter {
602603 this . superdocStore . documents . forEach ( ( doc ) => {
603604 const editor = doc . getEditor ( ) ;
604605 if ( editor ) {
605- docxPromises . push ( editor . exportDocx ( { comments, commentsType } ) ) ;
606+ docxPromises . push ( editor . exportDocx ( { isFinalDoc , comments, commentsType } ) ) ;
606607 }
607608 } ) ;
608609 return await Promise . all ( docxPromises ) ;
0 commit comments