mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 20:38:55 +03:00
Avoid shadowing window.setTimeout
This commit is contained in:
parent
71bdc5987b
commit
af514385b2
1 changed files with 2 additions and 2 deletions
|
@ -625,7 +625,7 @@ const PHASE_MAP = {
|
||||||
|
|
||||||
function VerificationRequest({txnId, request}) {
|
function VerificationRequest({txnId, request}) {
|
||||||
const [, updateState] = useState();
|
const [, updateState] = useState();
|
||||||
const [timeout, setTimeout] = useState(request.timeout);
|
const [timeout, setRequestTimeout] = useState(request.timeout);
|
||||||
|
|
||||||
/* Re-render if something changes state */
|
/* Re-render if something changes state */
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -639,7 +639,7 @@ function VerificationRequest({txnId, request}) {
|
||||||
|
|
||||||
/* Note that request.timeout is a getter, so its value changes */
|
/* Note that request.timeout is a getter, so its value changes */
|
||||||
const id = setInterval(() => {
|
const id = setInterval(() => {
|
||||||
setTimeout(request.timeout);
|
setRequestTimeout(request.timeout);
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
return () => { clearInterval(id); };
|
return () => { clearInterval(id); };
|
||||||
|
|
Loading…
Reference in a new issue