Skip to content

Undefined used as weak map key #1319

@BorePlusPlus

Description

@BorePlusPlus

Hi,

I am using lodash with node.js 0.12.5 and am getting following error thrown.

      return metaMap.get(func);
                     ^
TypeError: Invalid value used as weak map key
    at WeakMap.get (native)
    at getData (/home/bore/stuff/node_modules/lodash/index.js:3856:22)
    at isLaziable (/home/bore/stuff/node_modules/lodash/index.js:4142:18)
    at wrapper (/home/bore/stuff/node_modules/lodash/index.js:3524:17)
    at dropTableStep (/home/bore/stuff/src/event-summary.js:29:12)
    at /home/bore/stuff/node_modules/lodash/index.js:3337:35
    at arrayMap (/home/bore/stuff/node_modules/lodash/index.js:1431:25)
    at Function.map (/home/bore/stuff/node_modules/lodash/index.js:6693:14)
    ....

On a first glance it seems strange to use other as a lookup key here as all non-lodash functions will cause it to evaluate to undefined (thus causing the error).

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