Thanks to visit codestin.com
Credit goes to github.com

Skip to content

_.invert() throws an error on a specific JSON object #3260

@radekk

Description

@radekk

JSFiddle: https://jsfiddle.net/mem9e9r9/
Error: TypeError: Cannot convert object to primitive value
Description:
It seems like invert() function is triggering an error when converting json object with builtin -> toString property present. I tried with standard JSON files and it does work properly.

It fails to run _.invert() on this JSON object:

{
  "builtin": {
    "toString": false
  }
}

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