Skip to content

Commit e298a27

Browse files
committed
Check for undefined in isThenable
1 parent ac717ff commit e298a27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client/activation/languageClientMiddleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,5 +470,5 @@ function captureTelemetryForLSPMethod(method: string, debounceMilliseconds: numb
470470

471471
// tslint:disable-next-line: no-any
472472
function isThenable<T>(v: any): v is Thenable<T> {
473-
return typeof v.then === 'function';
473+
return typeof v?.then === 'function';
474474
}

0 commit comments

Comments
 (0)