diff --git a/ts/components/CallingPip.tsx b/ts/components/CallingPip.tsx index d12ca09005..ee4a361bdb 100644 --- a/ts/components/CallingPip.tsx +++ b/ts/components/CallingPip.tsx @@ -38,7 +38,7 @@ export const CallingPip = ({ setRendererCanvas, togglePip, }: PropsType): JSX.Element | null => { - const videoContainerRef = React.useRef(null); + const videoContainerRef = React.useRef(null); const localVideoRef = React.useRef(null); const [dragState, setDragState] = React.useState({ @@ -144,7 +144,7 @@ export const CallingPip = ({ if (!node) { return; } - const rect = (node as HTMLElement).getBoundingClientRect(); + const rect = node.getBoundingClientRect(); const offsetX = ev.clientX - rect.left; const offsetY = ev.clientY - rect.top; diff --git a/ts/util/lint/exceptions.json b/ts/util/lint/exceptions.json index d6fa2242eb..04f0cc1f5d 100644 --- a/ts/util/lint/exceptions.json +++ b/ts/util/lint/exceptions.json @@ -14423,15 +14423,6 @@ "updated": "2020-10-26T19:12:24.410Z", "reasonDetail": "Used to get the local video element for rendering." }, - { - "rule": "React-useRef", - "path": "ts/components/CallingPip.tsx", - "line": " const videoContainerRef = React.useRef(null);", - "lineNumber": 41, - "reasonCategory": "usageTrusted", - "updated": "2020-10-26T19:12:24.410Z", - "reasonDetail": "Element is measured. Its HTML is not used." - }, { "rule": "React-useRef", "path": "ts/components/CallingPip.tsx",