Skip to content

Commit

Permalink
refactor: use optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
benlesh committed Sep 23, 2020
1 parent 769a298 commit 910ac5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/internal/util/lift.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { OperatorFunction, TeardownLogic } from '../types';
* Used to determine if an object is an Observable with a lift function.
*/
export function hasLift(source: any): source is { lift: InstanceType<typeof Observable>['lift'] } {
return source && typeof source.lift === 'function';
return typeof source?.lift === 'function';
}

/**
Expand Down

0 comments on commit 910ac5b

Please sign in to comment.