From 68cd79db34c0c871ebae2ed3360ccd89f8b56b35 Mon Sep 17 00:00:00 2001 From: npezza93 Date: Thu, 17 Aug 2017 19:44:37 -0400 Subject: [PATCH] Set bellStyle to a string type instead of an array of strings --- src/Interfaces.ts | 2 +- src/Terminal.ts | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Interfaces.ts b/src/Interfaces.ts index 22531fa3..943003ae 100644 --- a/src/Interfaces.ts +++ b/src/Interfaces.ts @@ -115,7 +115,7 @@ export interface IInputHandlingTerminal extends IEventEmitter { export interface ITerminalOptions { bellSound?: string; - bellStyle?: string[]; + bellStyle?: string; cancelEvents?: boolean; colors?: string[]; cols?: number; diff --git a/src/Terminal.ts b/src/Terminal.ts index ac00f390..82bb9589 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -2284,15 +2284,11 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT } private visualBell(): boolean { - let styles = [].concat.apply([], [this.options.bellStyle]); - - return styles.indexOf('visual') > -1 || styles.indexOf('both') > -1; + return this.options.bellStyle == 'visual' || this.options.bellStyle == 'both'; } private soundBell(): boolean { - let styles = [].concat.apply([], [this.options.bellStyle]); - - return styles.indexOf('sound') > -1 || styles.indexOf('both') > -1; + return this.options.bellStyle == 'sound' || this.options.bellStyle == 'both'; } private preloadBellSound(): void {