Merge pull request #5642 from Tyriar/startsWith
Prefer startsWith over indexOf === 0
This commit is contained in:
@@ -1782,7 +1782,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
* @param term The terminal name to evaluate
|
||||
*/
|
||||
private _is(term: string): boolean {
|
||||
return (this._optionsService.rawOptions.termName + '').indexOf(term) === 0;
|
||||
return (this._optionsService.rawOptions.termName + '').startsWith(term);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user