Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Fix setTimeout polyfill

zbettenbuk8dc866fab39a
diff --git a/react/features/base/lib-jitsi-meet/native/polyfills-browser.js b/react/features/base/lib-jitsi-meet/native/polyfills-browser.js
index 24089b1c47..4fb3e47fd1 100644
--- a/react/features/base/lib-jitsi-meet/native/polyfills-browser.js
+++ b/react/features/base/lib-jitsi-meet/native/polyfills-browser.js
@@ -372,6 +372,6 @@ function _visitNode(node, callback) {
global.clearTimeout = BackgroundTimer.clearTimeout.bind(BackgroundTimer);
global.clearInterval = BackgroundTimer.clearInterval.bind(BackgroundTimer);
global.setInterval = BackgroundTimer.setInterval.bind(BackgroundTimer);
- global.setTimeout = BackgroundTimer.setTimeout.bind(BackgroundTimer);
+ global.setTimeout = (fn, ms = 0) => BackgroundTimer.setTimeout(fn, ms);
})(global || window || this); // eslint-disable-line no-invalid-this