Skip to content

_.chunk([], 5) returns [] #5293

@mboudreau

Description

@mboudreau

My expectations for a chunking function whose whole purpose is suppose to return a 2D array is to return a 2D array no matter the circumstance. But I discovered that if you give it an empty array, it just returns an empty 1D array which breaks expectations and typings.

I can create a quick PR to fix this but would be keen to hear about why this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue bankruptcyClosing the issue/PR to start fresh

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions