Fix grecaptcha throwing useless error sometimes

This commit is contained in:
Dariusz Niemczyk 2021-07-19 15:41:44 +02:00
parent 863f4d4f9f
commit 9de5ebd4de
No known key found for this signature in database
GPG key ID: 0AD2F70C94CA5B03
2 changed files with 54 additions and 30 deletions

View file

@ -90,6 +90,7 @@ declare global {
mxUIStore: UIStore;
mxSetupEncryptionStore?: SetupEncryptionStore;
mxRoomScrollStateStore?: RoomScrollStateStore;
mxOnRecaptchaLoaded?: () => void;
}
interface Document {
@ -114,7 +115,7 @@ declare global {
}
interface StorageEstimate {
usageDetails?: {[key: string]: number};
usageDetails?: { [key: string]: number };
}
interface HTMLAudioElement {
@ -185,4 +186,19 @@ declare global {
parameterDescriptors?: AudioParamDescriptor[];
}
);
// eslint-disable-next-line no-var
var grecaptcha:
| undefined
| {
reset: (id: string) => void;
render: (
divId: string,
options: {
sitekey: string;
callback: () => void;
}
) => string;
isReady: () => boolean;
};
}