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

Object doesn't support property or method 'trimStart' #652

Closed
1 task
asaadbaw opened this issue May 4, 2024 · 3 comments
Closed
1 task

Object doesn't support property or method 'trimStart' #652

asaadbaw opened this issue May 4, 2024 · 3 comments

Comments

@asaadbaw
Copy link

asaadbaw commented May 4, 2024

  • [ x] Are you running the latest version?
  • [ x] Have you included sample input, output, error, and expected output?
  • [x ] Have you checked if you are using correct configuration?
  • [ x] Did you try online tool?

Description

I have a uwp reactnative app when I run as debug works fine but when I release the application it gives me this error:
Object doesn't support property or method 'trimStart'

Input

xml checked online in many xml validation tools and its fine

Code

private parser_options = {
ignoreAttributes: false,
ignoreDeclaration: true,
ignorePiTags: true,
parseTagValue: false,
trimValues: false,
};

constructor(xml_str?: string) {
try {
const parser = new XMLParser(this.parser_options);

  if (xml_str) {
    this.xml_object = parser.parse(xml_str) ?? {
      '?xml': { '@_version': '1.0', '@_encoding': 'UTF-8' },
    };
  } else {
    this.xml_object = {
      '?xml': { '@_version': '1.0', '@_encoding': 'UTF-8' },
    };
  }
} catch (e) {
  console.log({
    type: 'exception',
    timestamp: new Date(),
    xml_str,
    error: e.message,
  });
}

}

Output

expected data

Would you like to work on this issue?

  • Yes
  • [x ] No

Bookmark this repository for further updates. Visit SoloThought to know about recent features.

Copy link

github-actions bot commented May 4, 2024

We're glad you find this project helpful. We'll try to address this issue ASAP. You can vist https://solothought.com to know recent features. Don't forget to star this repo.

@amitguptagwl
Copy link
Member

Can you please share the sample XML that is causing issue? smaller is preferable.

@amitguptagwl
Copy link
Member

Closing the issue. Please reopen if problem exist with sample XML and library version.

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