mirror of https://github.com/laurent22/joplin.git
Desktop: Dev fix: TypeScript error
parent
8eff3f5616
commit
38ced8cb09
|
@ -72,7 +72,7 @@ export function useSelectionRange(editor: any) {
|
||||||
// and even infinite rendering loops. So before setting it on the state
|
// and even infinite rendering loops. So before setting it on the state
|
||||||
// we deep compare the previous and new selection.
|
// we deep compare the previous and new selection.
|
||||||
// https://github.com/laurent22/joplin/issues/3200
|
// https://github.com/laurent22/joplin/issues/3200
|
||||||
setSelectionRange(prev => {
|
setSelectionRange((prev:any) => {
|
||||||
if (selectionRangesEqual(prev, firstRange)) return prev;
|
if (selectionRangesEqual(prev, firstRange)) return prev;
|
||||||
return firstRange;
|
return firstRange;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue