We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug When converting object to xml, it's not expected to convert number 0 into empty content.
0
To Reproduce
const { create } = require('xmlbuilder2'); const xml = create().ele({ value: 0 }).end()
will produce
<?xml version="1.0"?><root><value/></root>
Expected behavior
It should be
<?xml version="1.0"?><root><value>0</value></root>
Version:
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
@oozcitak Is it ok to change this condtion to else if (value != null)
else if (value != null)
xmlbuilder2/src/builder/XMLBuilderImpl.ts
Lines 170 to 172 in 3a30fbe
Sorry, something went wrong.
Yes that should do it. Would you like to send a PR?
@oozcitak ok, i will send it soon
Add test for issue #21
c99cb8d
oozcitak
Successfully merging a pull request may close this issue.
Describe the bug
When converting object to xml, it's not expected to convert number
0
into empty content.To Reproduce
will produce
Expected behavior
It should be
Version:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: