We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 693bf9f commit 50bd432Copy full SHA for 50bd432
ui/frontend/editor/SimpleEditor.tsx
@@ -1,3 +1,4 @@
1
+import { isEqual } from 'lodash-es';
2
import React from 'react';
3
4
import { CommonEditorProps, Position, Selection } from '../types';
@@ -85,7 +86,7 @@ class SimpleEditor extends React.PureComponent<CommonEditorProps> {
85
86
if (!newPosition || !editor) {
87
return;
88
}
- if (newPosition === oldPosition) {
89
+ if (isEqual(newPosition, oldPosition)) {
90
91
92
@@ -102,7 +103,7 @@ class SimpleEditor extends React.PureComponent<CommonEditorProps> {
102
103
if (!newSelection || !newSelection.start || !newSelection.end || !editor) {
104
105
- if (newSelection === oldSelection) {
106
+ if (isEqual(newSelection, oldSelection)) {
107
108
109
0 commit comments