Skip to content

Commit cc9fb97

Browse files
committed
refactor: redundant check
1 parent 1035e16 commit cc9fb97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async function isValidDirectory(dirPath: PathLike) {
4848
function hasAddListenerMethods(object: EventEmitter): boolean {
4949
function hasMethod(methodName: string) {
5050
const method = (object as unknown as Record<string, unknown>)[methodName];
51-
if (!method || typeof method !== "function") {
51+
if (typeof method !== "function") {
5252
return false;
5353
}
5454
return true;

0 commit comments

Comments
 (0)