immutable-js-oss / immutable-js

Immutable persistent data collections for Javascript which increase efficiency and simplicity.
https://immutable-js-oss.github.io/immutable-js/
MIT License
37 stars 6 forks source link

Empty record merge returns undefined #178

Closed Methuselah96 closed 4 years ago

Methuselah96 commented 4 years ago

From @acrazing on Wed, 09 Sep 2020 07:34:10 GMT

For example:

import { Record } from 'immutable';

const emptyRecord = Record({})();

console.log(emptyRecord.merge({ id: 1 })); // -> undefined, expected result is emptyRecord

See CodeSandbox

Copied from original issue: https://github.com/immutable-js/immutable-js/issues/1785

Methuselah96 commented 4 years ago

Resolved in https://github.com/immutable-js-oss/immutable-js/pull/23.