From b70c592814864697e36d369b203f8249301215e5 Mon Sep 17 00:00:00 2001 From: unadlib Date: Sun, 25 Feb 2024 23:59:06 +0800 Subject: [PATCH] fix(export): fix --- package.json | 2 +- src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c3f269c..53d4cdc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mutability", - "version": "0.3.0", + "version": "0.3.1", "description": "A JavaScript library for transactional mutable updates", "main": "dist/index.cjs.js", "unpkg": "dist/index.umd.js", diff --git a/src/index.ts b/src/index.ts index c93776d..0f083b3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,11 +1,11 @@ -import { create } from 'mutative'; +import * as mutative from 'mutative'; import { apply } from './apply'; /** * Transactional updates to the base state with the recipe. */ export const mutate = (baseState: T, recipe: (state: T) => void) => { - const [, patches] = create(baseState, recipe, { + const [, patches] = mutative.create(baseState, recipe, { enablePatches: true, }); apply(baseState, patches);