object-path-immutable icon indicating copy to clipboard operation
object-path-immutable copied to clipboard

del over nonexistent path will create every step except the last that purports to delete

Open nunodelisboa opened this issue 6 years ago • 1 comments

An example is this:

import immutable from 'object-path-immutable';

const obj = { foo: { bar: true } };
const newObj = immutable.del(obj, 'foo.rab.oof'); 

What one gets is

{ foo: { bar: true, rab: { } }

The expected behavior is

{ foo: { bar: true } }

nunodelisboa avatar Nov 19 '19 18:11 nunodelisboa

I confirm...

gendronb avatar Jul 27 '21 19:07 gendronb