Skip to content

Commit

Permalink
fix(portable-text-editor): fix cyclic dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard committed Sep 27, 2022
1 parent c306d0b commit d15e484
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {debugWithName} from '../../utils/debug'
import {PATCHING, isPatching, withoutPatching} from '../../utils/withoutPatching'
import {KEY_TO_VALUE_ELEMENT} from '../../utils/weakMaps'
import {createPatchToOperations} from '../../utils/patchToOperations'
import {keyGenerator} from '../..'
import {defaultKeyGenerator} from '../../editor/PortableTextEditor'
import {withPreserveKeys} from '../../utils/withPreserveKeys'
import {withoutSaving} from './createWithUndoRedo'

Expand Down Expand Up @@ -98,7 +98,7 @@ export function createWithPatches({
// The editor.children would no longer contain that information if the node is already deleted.
let previousChildren: Descendant[]

const patchToOperations = createPatchToOperations(portableTextFeatures, keyGenerator)
const patchToOperations = createPatchToOperations(portableTextFeatures, defaultKeyGenerator)
let patchSubscription: Subscription
const cleanupFn = () => {
if (patchSubscription) {
Expand Down

0 comments on commit d15e484

Please sign in to comment.