Closed exuanbo closed 9 months ago
Currently:
const { create, markSimpleObject, rawReturn } = require('mutative'); create(null, (_draft) => rawReturn({}), { mark: markSimpleObject, });
will throw error:
TypeError: Cannot convert undefined or null to object
Reproduction: https://stackblitz.com/edit/stackblitz-starters-k3gwyj?file=index.js
Reference: https://github.com/unadlib/mutative/blob/ed780e0dc0e3ff864fbb9c7d0af3439ccf4100cc/test/immer/src/immer.ts#L164-L181
Thank you for your contribution. I will release v1.0.1 after adding tests.
Currently:
will throw error:
Reproduction: https://stackblitz.com/edit/stackblitz-starters-k3gwyj?file=index.js
Reference: https://github.com/unadlib/mutative/blob/ed780e0dc0e3ff864fbb9c7d0af3439ccf4100cc/test/immer/src/immer.ts#L164-L181