utils.appendChild mutates child fragment
Open
- Dominant language
- JavaScript
- Stars
- 12
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
When calling `utils.appendChild` with a child fragment, the fragment is mutated, resulting in an empty array.
```js
const jml = ['div'];
const fragment = ['', 'hello world'];
utils.appendChild(jml, fragment);
// jml === ['div', 'hello world']
// fragment === []
```
Ideally, the fragment should not be mutated.
See discussion: https://github.com/benjycui/jsonml.js/pull/5#discussion_r146114631
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.