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
When writing tests for the utils methods, I came across some logic that was confusing: https://github.com/benjycui/jsonml.js/blob/master/lib/utils.js#L132
} else if (child || !parent.length) { // append parent.push(child);
This allows for some unclear behavior, particularly when allowing exception for a parent with no length.
const jml = []; utils.appendChild(jml, ''); // jml === ['']
const jml = []; utils.appendChild(jml, ['p', 'hello']); // jml === [ ['p', 'hello'] ]
Is this a real use case or an edge case bug? I'm guessing this would never be desired and should probably not be allowed.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When writing tests for the utils methods, I came across some logic that was confusing:
https://github.com/benjycui/jsonml.js/blob/master/lib/utils.js#L132
This allows for some unclear behavior, particularly when allowing exception for a parent with no length.
Is this a real use case or an edge case bug? I'm guessing this would never be desired and should probably not be allowed.
The text was updated successfully, but these errors were encountered: