1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

realtime-callbacks: pass global as this

We had a test for this, but apparently it wasn't testing it right...
This commit is contained in:
Richard van der Hoff
2017-02-08 07:32:28 +00:00
parent d453813db4
commit 3277820381

View File

@@ -168,7 +168,7 @@ function _runCallbacks() {
for (let i = 0; i < callbacksToRun.length; i++) {
cb = callbacksToRun[i];
try {
cb.func.apply(null, cb.params);
cb.func.apply(global, cb.params);
} catch (e) {
console.error("Uncaught exception in callback function",
e.stack || e);