From b903dd4e4a3da579e4629a5e992ab16740d440f7 Mon Sep 17 00:00:00 2001 From: Legend Tang Date: Fri, 6 Mar 2015 03:29:15 +0800 Subject: Revert "revert to custom EventEmitter, workaround for #504" This reverts commit fa8fc64ce0170b029410600af20b25c8160fe5c6. --- web/src/js/store/view.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'web/src/js/store/view.js') 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); -- cgit v1.2.3