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