From 4c64e9ba821a4b1f3319e9b4501f4c2f930facfc Mon Sep 17 00:00:00 2001 From: bokuweb Date: Fri, 29 Mar 2024 16:03:13 +0900 Subject: [PATCH] Fix header footer rels order (#695) * fix: header footer resls order * fix --- docx-core/src/documents/mod.rs | 8 ++++---- docx-wasm/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docx-core/src/documents/mod.rs b/docx-core/src/documents/mod.rs index 9de4b4e..01813bd 100644 --- a/docx-core/src/documents/mod.rs +++ b/docx-core/src/documents/mod.rs @@ -951,7 +951,7 @@ impl Docx { header_images[0] = images; } - if let Some(header) = &mut self.document.section_property.even_header.as_mut() { + if let Some(header) = &mut self.document.section_property.first_header.as_mut() { let mut images: Vec = vec![]; for child in header.children.iter_mut() { match child { @@ -997,7 +997,7 @@ impl Docx { header_images[1] = images; } - if let Some(header) = &mut self.document.section_property.first_header.as_mut() { + if let Some(header) = &mut self.document.section_property.even_header.as_mut() { let mut images: Vec = vec![]; for child in header.children.iter_mut() { match child { @@ -1096,7 +1096,7 @@ impl Docx { footer_images[0] = images; } - if let Some(footer) = &mut self.document.section_property.even_footer.as_mut() { + if let Some(footer) = &mut self.document.section_property.first_footer.as_mut() { let mut images: Vec = vec![]; for child in footer.children.iter_mut() { match child { @@ -1142,7 +1142,7 @@ impl Docx { footer_images[1] = images; } - if let Some(footer) = &mut self.document.section_property.first_footer.as_mut() { + if let Some(footer) = &mut self.document.section_property.even_footer.as_mut() { let mut images: Vec = vec![]; for child in footer.children.iter_mut() { match child { diff --git a/docx-wasm/package.json b/docx-wasm/package.json index 4fba1e0..5268910 100644 --- a/docx-wasm/package.json +++ b/docx-wasm/package.json @@ -1,6 +1,6 @@ { "name": "docx-wasm", - "version": "0.4.12-beta17", + "version": "0.4.12-beta19", "main": "dist/node/index.js", "browser": "dist/web/index.js", "author": "bokuweb ",