Desktop: Dev fix: TypeScript error

pull/3189/head^2
Laurent Cozic 2020-05-20 09:38:14 +01:00
parent 8eff3f5616
commit 38ced8cb09
1 changed files with 1 additions and 1 deletions

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;
});