aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/dispatcher.js
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-12-10 00:47:05 +0100
committerMaximilian Hils <git@maximilianhils.com>2014-12-10 00:47:05 +0100
commite12bf19e35867f3ea69f45054decb024a75fc2b4 (patch)
tree8201f5fd9f07d46a1a659bdfa93b2176066f4961 /web/src/js/dispatcher.js
parent05bc7e8cd8382aabdd44f7bc569d2fd421c26f21 (diff)
downloadmitmproxy-e12bf19e35867f3ea69f45054decb024a75fc2b4.tar.gz
mitmproxy-e12bf19e35867f3ea69f45054decb024a75fc2b4.tar.bz2
mitmproxy-e12bf19e35867f3ea69f45054decb024a75fc2b4.zip
web: add event store, fix all those bugs
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) {