mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
clean up
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
d835fe7358
commit
132d5fae2c
@ -152,7 +152,7 @@ export class StorageHelper<T> {
|
|||||||
const nextValue = produce<T>(this.toJSON(), (draft: Draft<T>) => {
|
const nextValue = produce<T>(this.toJSON(), (draft: Draft<T>) => {
|
||||||
|
|
||||||
if (typeof value == "function") {
|
if (typeof value == "function") {
|
||||||
const newValue = value(draft) as Draft<T>;
|
const newValue = value(draft);
|
||||||
|
|
||||||
// merge returned plain objects from `value-as-callback` usage
|
// merge returned plain objects from `value-as-callback` usage
|
||||||
// otherwise `draft` can be just modified inside a callback without returning any value (void)
|
// otherwise `draft` can be just modified inside a callback without returning any value (void)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user