From 29a1ef040e635253f12f7ac2d93e97808c28cf9e Mon Sep 17 00:00:00 2001 From: eric Date: Fri, 2 Sep 2016 11:44:00 +0800 Subject: [PATCH] fix image issue, eq. add image in 2 sheet, it make microsoft office to warning with repair --- source/lib/workbook/builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/workbook/builder.js b/source/lib/workbook/builder.js index 134c4c5..e276225 100644 --- a/source/lib/workbook/builder.js +++ b/source/lib/workbook/builder.js @@ -17,9 +17,9 @@ let addRootContentTypesXML = (promiseObj) => { .att('xmlns', 'http://schemas.openxmlformats.org/package/2006/content-types'); let contentTypesAdded = []; + let extensionsAdded = []; promiseObj.wb.sheets.forEach((s, i) => { if (s.drawingCollection.length > 0) { - let extensionsAdded = []; s.drawingCollection.drawings.forEach((d) => { if (extensionsAdded.indexOf(d.extension) < 0) { let typeRef = d.contentType + '.' + d.extension;