File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
docSite/content/zh-cn/docs/development/upgrading
packages/service/worker/readFile Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -26,4 +26,5 @@ weight: 802
26
26
27
27
1 . 标签过滤时,子文件夹未成功过滤。
28
28
2 . 暂时移除 md 阅读优化,避免链接分割错误。
29
- 3 . 离开团队时,未刷新成员列表。
29
+ 3 . 离开团队时,未刷新成员列表。
30
+ 4 . PPTX 编码错误,导致解析失败。
Original file line number Diff line number Diff line change @@ -45,10 +45,12 @@ const parsePowerPoint = async ({
45
45
46
46
// Returning an array of all the xml contents read using fs.readFileSync
47
47
const xmlContentArray = await Promise . all (
48
- files . map ( ( file ) => {
49
- return fs . promises . readFile ( `${ decompressPath } /${ file . path } ` , encoding ) . catch ( ( ) => {
50
- return fs . promises . readFile ( `${ decompressPath } /${ file . path } ` , 'utf-8' ) ;
51
- } ) ;
48
+ files . map ( async ( file ) => {
49
+ try {
50
+ return await fs . promises . readFile ( `${ decompressPath } /${ file . path } ` , encoding ) ;
51
+ } catch ( err ) {
52
+ return await fs . promises . readFile ( `${ decompressPath } /${ file . path } ` , 'utf-8' ) ;
53
+ }
52
54
} )
53
55
) ;
54
56
You can’t perform that action at this time.
0 commit comments