Skip to content

Commit 56aa453

Browse files
committed
fix: remove unnecessary async/await from _onkeydown methods
Fixes TypeScript linter errors for awaiting non-Promise parent calls
1 parent 567c8eb commit 56aa453

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/main/src/ListItemCustom.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ class ListItemCustom extends ListItem {
5656
@property()
5757
declare accessibleName?: string;
5858

59-
async _onkeydown(e: KeyboardEvent) {
59+
_onkeydown(e: KeyboardEvent) {
6060
const isTab = isTabNext(e) || isTabPrevious(e);
6161
const isFocused = this.matches(":focus");
6262

6363
if (!isTab && !isFocused && !isF2(e) && !isF7(e)) {
6464
return;
6565
}
6666

67-
await super._onkeydown(e);
67+
super._onkeydown(e);
6868
}
6969

7070
_onkeyup(e: KeyboardEvent) {

packages/main/src/TreeItemBase.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ class TreeItemBase extends ListItem {
313313
this.fireDecoratorEvent("toggle", { item: this });
314314
}
315315

316-
async _onkeydown(e: KeyboardEvent) {
317-
await super._onkeydown(e);
316+
_onkeydown(e: KeyboardEvent) {
317+
super._onkeydown(e);
318318

319319
if (!this._fixed && this.showToggleButton && isRight(e)) {
320320
if (!this.expanded) {

0 commit comments

Comments
 (0)