Remove bellAudioElement if it is not used. Remove extra import

This commit is contained in:
npezza93
2017-08-17 18:27:49 -04:00
parent c88f50125b
commit 8a6bff42c9
2 changed files with 2 additions and 1 deletions
-1
View File
@@ -7,7 +7,6 @@ import { C0 } from './EscapeSequences';
import { DEFAULT_CHARSET } from './Charsets';
import { CharData } from './Types';
import { CHAR_DATA_CHAR_INDEX, CHAR_DATA_WIDTH_INDEX } from './Buffer';
import { BellSound } from './utils/Sounds';
/**
* The terminal's standard implementation of IInputHandler, this handles all
+2
View File
@@ -2301,6 +2301,8 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
this.bellAudioElement.setAttribute('preload', 'auto');
this.bellAudioElement.setAttribute('src', this.options.bellSound);
this.element.appendChild(this.bellAudioElement);
} else if (this.bellAudioElement) {
this.bellAudioElement.remove();
}
}
}