fix(ofd):update cnofd viewer for OFD compatibility - #783
Open
xushenl wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题说明
部分 OFD 文件的签章配置中存在空的 References 节点,例如:
<ofd:References CheckMethod="..."/>旧版 cnofd 在解析该结构时,会直接遍历不存在的 Reference 子节点,导致预览失败并出现以下异常:
TypeError: Cannot read properties of undefined (reading 'forEach')修改内容
更新 cnofd.umd.min.js 至上游兼容版本,使解析器能够正确处理不包含 Reference 子节点的签章 References 节点。
本次修改仅涉及:
不涉及服务端接口、配置和其他预览逻辑。
问题复现:
Doc_0/Signs/Sign_0/Signature.xml文件。<ofd:References CheckMethod="test"/>