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

Xml Section parse error while some child tags may not exist #1556

Open
1 task done
allandiego opened this issue Jun 26, 2024 · 0 comments · May be fixed by #1557
Open
1 task done

Xml Section parse error while some child tags may not exist #1556

allandiego opened this issue Jun 26, 2024 · 0 comments · May be fixed by #1557
Assignees
Labels
area-file-formats Related to supported file formats platform-all Affects all platforms state-accepted This is a valid topic to work on. type-bug 🕷️

Comments

@allandiego
Copy link
Contributor

allandiego commented Jun 26, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

throws an error while trying to parse a gp file that have Section tag without a Letter child tag

TypeError: Cannot read properties of null (reading 'innerText')
  GpifParser.parseMasterBar importer/GpifParser.ts:1187:67
    1185|           case 'Section':
    1186|             masterBar.section = new Section();
    1187|             masterBar.section.marker = c.findChildElement('Letter')!.innerText;
       |                                                                   ^
    1188|             masterBar.section.text = c.findChildElement('Text')!.innerText;

Expected Behavior

Parse the gp file ignoring the non existence of the tag

Steps To Reproduce

try parse this gp file
tab-example-1.zip

Link to jsFiddle, CodePen, Project

No response

Found in Version

1.4 (alpha)

Platform

Node.js

Environment

- **OS**: win 10 pro
- **Browser**: fire fox
- **.net Version**:

Anything else?

No response

@allandiego allandiego added the state-needs-triage Bug not triaged yet. label Jun 26, 2024
@allandiego allandiego linked a pull request Jun 26, 2024 that will close this issue
6 tasks
@Danielku15 Danielku15 added type-bug 🕷️ area-file-formats Related to supported file formats state-accepted This is a valid topic to work on. platform-all Affects all platforms and removed state-needs-triage Bug not triaged yet. labels Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-file-formats Related to supported file formats platform-all Affects all platforms state-accepted This is a valid topic to work on. type-bug 🕷️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants