File tree 1 file changed +3
-8
lines changed
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -300,18 +300,13 @@ export const editable = <T>(
300
300
const flushCommand = ( ) => {
301
301
if ( commands . length ) {
302
302
const selection : Writeable < SelectionSnapshot > = [ ...currentSelection ] ;
303
- const dom : Writeable < DocFragment > = takeDomSnapshot (
304
- document ,
305
- element ,
306
- parserConfig ,
307
- serializeVoid
308
- ) as Writeable < DocFragment > ; // TODO improve type
303
+ const doc : Writeable < DocFragment > = [ ...history . get ( ) [ 0 ] ] ;
309
304
310
305
let command : ( typeof commands ) [ number ] | undefined ;
311
306
while ( ( command = commands . pop ( ) ) ) {
312
- command [ 0 ] ( dom , selection , ...command [ 1 ] ) ;
307
+ command [ 0 ] ( doc , selection , ...command [ 1 ] ) ;
313
308
}
314
- updateState ( dom , selection , currentSelection ) ;
309
+ updateState ( doc , selection , currentSelection ) ;
315
310
}
316
311
} ;
317
312
You can’t perform that action at this time.
0 commit comments