Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Empty arrays are removed from the request #7

@mjsarfatti

Description

@mjsarfatti

If I send an object with a property that is an empty array, this property gets removed from the request and not sent to the server.

This is unexpected and breaks a functionality where you would send an empty array to, for example, reset some property on the server.

Sending an empty string, empty object, or null value seems to work instead.

For a reproduction you can see: https://codesandbox.io/s/axios-empty-array-bug-w4yhd?file=/src/index.js

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