File tree 3 files changed +4
-4
lines changed
packages/cozy-external-bridge/src
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export const extractUrl = (url: string): string => {
10
10
export const handleRequestParentOrigin = (
11
11
event : MessageEvent ,
12
12
origin : string
13
- ) => {
13
+ ) : void => {
14
14
// We do not care about message from other origin that our iframe
15
15
if ( event . origin !== origin ) {
16
16
return
Original file line number Diff line number Diff line change @@ -53,13 +53,13 @@ const useInitialRedirection = (): void => {
53
53
}
54
54
55
55
// Allow the iframe to request the origin of the parent window
56
- const useParentOrigin = ( origin : string ) => {
56
+ const useParentOrigin = ( origin : string ) : void => {
57
57
const client = useClient ( )
58
58
59
59
useEffect ( ( ) => {
60
60
if ( ! client ) return
61
61
62
- const requestParentOriginHandler = ( event : MessageEvent ) =>
62
+ const requestParentOriginHandler = ( event : MessageEvent ) : void =>
63
63
handleRequestParentOrigin ( event , origin )
64
64
65
65
window . addEventListener ( 'message' , requestParentOriginHandler )
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ const requestParentOrigin = (): Promise<string | undefined> => {
66
66
return resolve ( undefined )
67
67
}
68
68
69
- const handleMessage = ( event : any ) => {
69
+ const handleMessage = ( event : MessageEvent ) : void => {
70
70
if ( event . data === 'answerParentOrigin' ) {
71
71
clearTimeout ( timeout )
72
72
window . removeEventListener ( 'message' , handleMessage )
You can’t perform that action at this time.
0 commit comments