Skip to content

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

Description

@Hughe5

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions