Skip to content

utils.appendChild mutates child fragment #7

@pgoldrbx

Description

@pgoldrbx

When calling utils.appendChild with a child fragment, the fragment is mutated, resulting in an empty array.

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: #5 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions