File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -689,7 +689,7 @@ export class PPTXConverter implements Converter {
689689 // Regular paragraph
690690 formattedContent . push ( {
691691 text : line ,
692- options : { paragraph : true } ,
692+ options : { } ,
693693 } ) ;
694694 }
695695 }
@@ -699,8 +699,10 @@ export class PPTXConverter implements Converter {
699699
700700 private extractText ( run : OSFTextRun ) : string {
701701 if ( typeof run === 'string' ) return run ;
702- if ( run . type === 'link' ) return run . text ;
703- if ( run . type === 'image' ) return run . alt || '' ;
702+ if ( typeof run === 'object' && run !== null && 'type' in run ) {
703+ if ( run . type === 'link' ) return run . text ;
704+ if ( run . type === 'image' ) return run . alt || '' ;
705+ }
704706 if ( 'text' in run && typeof run . text === 'string' ) return run . text ;
705707 return '' ;
706708 }
Original file line number Diff line number Diff line change @@ -471,8 +471,10 @@ export class XLSXConverter implements Converter {
471471
472472 private extractText ( run : OSFTextRun ) : string {
473473 if ( typeof run === 'string' ) return run ;
474- if ( run . type === 'link' ) return run . text ;
475- if ( run . type === 'image' ) return run . alt || '' ;
474+ if ( typeof run === 'object' && run !== null && 'type' in run ) {
475+ if ( run . type === 'link' ) return run . text ;
476+ if ( run . type === 'image' ) return run . alt || '' ;
477+ }
476478 if ( 'text' in run && typeof run . text === 'string' ) return run . text ;
477479 return '' ;
478480 }
You can’t perform that action at this time.
0 commit comments