Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parseOfdDocument 解析到的 ofd:Template 是个数组,造成 renderPage 方法报错 TypeError: Cannot read properties of undefined (reading 'json') #112

Open
Hughe5 opened this issue May 31, 2024 · 3 comments

Comments

@Hughe5
Copy link

Hughe5 commented May 31, 2024

使用 parseOfdDocument 方法解析 ofd 文件,success 返回的数据里 pages[0][47].json["ofd:Template"] 是个数组,不是对象,如下图,
image
当 template 是数组时,template['@_TemplateID']]['json'] 会报 TypeError: Cannot read properties of undefined (reading 'json') 的错误,如下图,
image

@Hughe5
Copy link
Author

Hughe5 commented Jun 3, 2024

@DLTech21
image
存在多个 Template 时会报错

@DLTech21
Copy link
Owner

DLTech21 commented Jun 3, 2024

自行修改

@Hughe5
Copy link
Author

Hughe5 commented Jun 4, 2024

@DLTech21 大佬,帮忙评审并合入一下 #113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants