This commit is contained in:
Olivier Gagnon 2022-07-19 18:30:59 -04:00
parent c3a10d5d95
commit 7dacf947bd

@ -1,7 +1,7 @@
import * as React from "react"; import * as React from "react";
export function trusted(f: () => void): (event: React.MouseEvent<HTMLElement, MouseEvent>) => any { export function trusted(f: () => void): (event: React.MouseEvent<HTMLElement, MouseEvent>) => void {
return function (event: React.MouseEvent<HTMLElement, MouseEvent>): any { return function (event: React.MouseEvent<HTMLElement, MouseEvent>): void {
if (!event.isTrusted) return; if (!event.isTrusted) return;
f(); f();
}; };