Skip to content

Commit

Permalink
Fix incorrect flushChanges check
Browse files Browse the repository at this point in the history
  • Loading branch information
kitten committed Apr 10, 2021
1 parent 0dadbb3 commit 1feaec5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/useEditable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,7 @@ export const useEditable = (
const flushChanges = () => {
state.queue.push(...state.observer.takeRecords());
const position = getPosition(element);
if (
state.queue.length ||
position.position !== state.position!.position ||
position.extent !== state.position!.extent
) {
if (state.queue.length) {
disconnect();
const content = toString(element);
state.position = position;
Expand Down

0 comments on commit 1feaec5

Please sign in to comment.