Keep previous terminal events after a reset

This broke in the EventEmitter ts conversion, just reverts this line to what
it used to be.

Fixes #451
This commit is contained in:
Daniel Imms
2017-01-07 16:04:49 -08:00
parent 1fbd3c8f65
commit 996c25a364
+3 -1
View File
@@ -11,7 +11,9 @@ export class EventEmitter {
private _events: {[type: string]: ListenerType[]};
constructor() {
this._events = {};
// Restore the previous events if available, this will happen if the
// constructor is called multiple times on the same object (terminal reset).
this._events = this._events || {};
}
public on(type, listener): void {