Skip to content
Myr

fix: draft as base state

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Forgot to remove an early `isDraft` check. 😂

authored by aleclarson · committed by Alec Larson · parent afaa737 · Browse files · 1 file+0 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+0 added−5 removed

  • other:+0 added−5 removed

1 file+0 added−5 removed

modified:src/immer.js-5 removed
54 unmodified lines
55 if (!isDraftable(base)) {56 result = recipe(base)57 if (result === undefined) return base58 }59 // See #100, don't nest producers60 else if (isDraft(base)) {61 result = recipe.call(base, base)62 if (result === undefined) return base63 }59 // The given value must be proxied.60 else {61 this.scopes.push([])62 const baseDraft = this.createDraft(base)
146 unmodified lines