diff options
author | Legend Tang <sp3478@gmail.com> | 2015-03-06 03:29:15 +0800 |
---|---|---|
committer | Legend Tang <sp3478@gmail.com> | 2015-03-06 03:29:15 +0800 |
commit | b903dd4e4a3da579e4629a5e992ab16740d440f7 (patch) | |
tree | 6424bee76941f64997e0104ec48b1dbc1cc6a389 /web/src/js/store/view.js | |
parent | fa8fc64ce0170b029410600af20b25c8160fe5c6 (diff) | |
download | mitmproxy-b903dd4e4a3da579e4629a5e992ab16740d440f7.tar.gz mitmproxy-b903dd4e4a3da579e4629a5e992ab16740d440f7.tar.bz2 mitmproxy-b903dd4e4a3da579e4629a5e992ab16740d440f7.zip |
Revert "revert to custom EventEmitter, workaround for #504"
This reverts commit fa8fc64ce0170b029410600af20b25c8160fe5c6.
Diffstat (limited to 'web/src/js/store/view.js')
-rw-r--r-- | web/src/js/store/view.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/web/src/js/store/view.js b/web/src/js/store/view.js index e96d1bcc..b5db9287 100644 --- a/web/src/js/store/view.js +++ b/web/src/js/store/view.js @@ -1,5 +1,8 @@ + +var EventEmitter = require('events').EventEmitter; var _ = require("lodash"); + var utils = require("../utils.js"); function SortByStoreOrder(elem) { @@ -12,7 +15,7 @@ var default_filt = function(elem){ }; function StoreView(store, filt, sortfun) { - utils.EventEmitter.call(this); + EventEmitter.call(this); filt = filt || default_filt; sortfun = sortfun || default_sort; @@ -30,7 +33,7 @@ function StoreView(store, filt, sortfun) { this.recalculate(filt, sortfun); } -_.extend(StoreView.prototype, utils.EventEmitter.prototype, { +_.extend(StoreView.prototype, EventEmitter.prototype, { close: function () { this.store.removeListener("add", this.add); this.store.removeListener("update", this.update); |