Skip to content

Side-effects options breaks Lodash's chain method #7186

@the-spyke

Description

@the-spyke

Do you want to request a feature or report a bug?

Bug.

What is the current behavior?

Importing chain from lodash-es@4.17.10 doesn't work with sideEffects: true (production mode).

TypeError: A(...).keys is not a function

If the current behavior is a bug, please provide the steps to reproduce.

import { chain } from "lodash-es";

const object = { y: 3, x: 5 };
const x = chain(object)
    .keys()
    .sort()
    .value();

What is the expected behavior?

Should work as it does with sideEffects: false.

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.

Node: 10.0.0
Webpack: 4.6.0
Lodash-es: 4.17.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions