Skip to content

Commit 405f014

Browse files
authored
style: code (alibaba#1945)
1 parent b636c6d commit 405f014

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/hooks/src/useKeyPress/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ function genKeyFormatter(keyFilter: KeyFilter, exactMatch: boolean): KeyPredicat
204204
return (event: KeyboardEvent) =>
205205
keyFilter.some((item) => genFilterKey(event, item, exactMatch));
206206
}
207-
return keyFilter ? () => true : () => false;
207+
return () => Boolean(keyFilter);
208208
}
209209

210210
const defaultEvents: KeyEvent[] = ['keydown'];

0 commit comments

Comments
 (0)