aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/dispatcher.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/dispatcher.js')
-rw-r--r--web/src/js/dispatcher.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/src/js/dispatcher.js b/web/src/js/dispatcher.js
index 7fa97481..860ade9f 100644
--- a/web/src/js/dispatcher.js
+++ b/web/src/js/dispatcher.js
@@ -11,9 +11,9 @@ Dispatcher.prototype.register = function (callback) {
this.callbacks.push(callback);
};
Dispatcher.prototype.unregister = function (callback) {
- var index = this.callbacks.indexOf(f);
+ var index = this.callbacks.indexOf(callback);
if (index >= 0) {
- this.callbacks.splice(this.callbacks.indexOf(f), 1);
+ this.callbacks.splice(index, 1);
}
};
Dispatcher.prototype.dispatch = function (payload) {