From 8a6bff42c9afd116333880e6c05e1c2fb5583d9d Mon Sep 17 00:00:00 2001 From: npezza93 Date: Thu, 17 Aug 2017 18:27:49 -0400 Subject: [PATCH] Remove bellAudioElement if it is not used. Remove extra import --- src/InputHandler.ts | 1 - src/Terminal.ts | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/InputHandler.ts b/src/InputHandler.ts index 3ec2aaf38..f2d977511 100644 --- a/src/InputHandler.ts +++ b/src/InputHandler.ts @@ -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 diff --git a/src/Terminal.ts b/src/Terminal.ts index 38235ee21..ac00f390f 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -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(); } } }