mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Use nullish coalescing in KeyboardService
This commit is contained in:
@@ -24,16 +24,12 @@ export class KeyboardService implements IKeyboardService {
|
||||
}
|
||||
|
||||
private _getWin32InputMode(): Win32InputMode {
|
||||
if (!this._win32InputMode) {
|
||||
this._win32InputMode = new Win32InputMode();
|
||||
}
|
||||
this._win32InputMode ??= new Win32InputMode();
|
||||
return this._win32InputMode;
|
||||
}
|
||||
|
||||
private _getKittyKeyboard(): KittyKeyboard {
|
||||
if (!this._kittyKeyboard) {
|
||||
this._kittyKeyboard = new KittyKeyboard();
|
||||
}
|
||||
this._kittyKeyboard ??= new KittyKeyboard();
|
||||
return this._kittyKeyboard;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user