mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 08:50:06 +02:00
Resolves #401 fix listeners
This commit is contained in:
parent
5545e7f94c
commit
aa4b8959e5
2 changed files with 10 additions and 3 deletions
|
@ -21,6 +21,8 @@ var events = assign(
|
|||
}
|
||||
}
|
||||
);
|
||||
// Allow unlimited listeners, so FF doesnt break
|
||||
events.setMaxListeners(0);
|
||||
var commandUI;
|
||||
var sandbox;
|
||||
var eventBaton;
|
||||
|
|
|
@ -96,6 +96,11 @@ GitVisuals.prototype.resetAll = function() {
|
|||
GitVisuals.prototype.tearDown = function() {
|
||||
this.resetAll();
|
||||
this.paper.remove();
|
||||
// Unregister the refresh tree listener so we dont accumulate
|
||||
// these over time. However we aren't calling tearDown in
|
||||
// some places... but this is an improvement
|
||||
var Main = require('../app');
|
||||
Main.getEvents().removeListener('refreshTree', this.refreshTree);
|
||||
};
|
||||
|
||||
GitVisuals.prototype.assignGitEngine = function(gitEngine) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue