Skip to content

lodash/fp in browser does not handle lodash having been called with noConflict #2694

@daedalus28

Description

@daedalus28

These lines check if _ is a function, but should really check if it is actually a lodash instance:
https://github.com/lodash/lodash/blob/master/fp/_convertBrowser.js#L15-L17

In our case we still (unfortunately) have some legacy code that needs underscore - we call lodash with noConflict but some code requires underscore to be global. We're working to rip it out completely, but ideally the check here would either be stricter or support some way of opting out of the automatic check (even if it's wrapped in an if (!window.dontAutoFP) or something that we can set before the script loads)

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