Remove bellAudioElement if it is not used. Remove extra import
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user