Skip to content

Doesn't handle passing array reference as path #27

@mariomc

Description

@mariomc

This example

import { get } from 'lodash';

const obj = { a: { b: { c: { d: 1 }}}};
const path = ['a','b','c','d'];

get(obj, path);

Turns into:

const obj = { a: { b: { c: { d: 1 }}}};
const path = ['a','b','c','d'];

obj?.[path];

Which is incorrect, obv. Will try to do a follow-up PR to tackle this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions