Skip to content

Commit

Permalink
Making the required sacrifices to the god of typechecking.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhbw committed Mar 27, 2021
1 parent c3fc2e3 commit 743a552
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,13 @@ export function getMainDoc(contentTypes: NonTextNode): string {
const MAIN_DOC_MIMES = [
'application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml',
'application/vnd.ms-word.document.macroEnabled.main+xml',
] as const;
];
for (const t of contentTypes._children) {
if (!t._fTextNode) {
if (MAIN_DOC_MIMES.indexOf(t._attrs.ContentType) > -1) {
if (
t._attrs.ContentType != null &&
MAIN_DOC_MIMES.includes(t._attrs.ContentType)
) {
const path = t._attrs.PartName;
if (path) {
return path.replace('/word/', '');
Expand Down

0 comments on commit 743a552

Please sign in to comment.