1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-27 10:32:58 +02:00

Desktop: Dev fix: TypeScript error

This commit is contained in:
Laurent Cozic 2020-05-20 09:38:14 +01:00
parent 8eff3f5616
commit 38ced8cb09

View File

@ -72,7 +72,7 @@ export function useSelectionRange(editor: any) {
// and even infinite rendering loops. So before setting it on the state
// we deep compare the previous and new selection.
// https://github.com/laurent22/joplin/issues/3200
setSelectionRange(prev => {
setSelectionRange((prev:any) => {
if (selectionRangesEqual(prev, firstRange)) return prev;
return firstRange;
});