Skip to content

Commit 72e805e

Browse files
committed
Prefer a different style
1 parent e0212df commit 72e805e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/worker/src/connection.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,8 @@ export class NativeConnection implements ConnectionLike {
222222
* Eagerly connect to the Temporal server and return a NativeConnection instance
223223
*/
224224
static async connect(options?: NativeConnectionOptions): Promise<NativeConnection> {
225-
let enableTestService = false;
226-
if ((options as InternalConnectionOptions)?.[InternalConnectionOptionsSymbol]?.supportsTestService) {
227-
enableTestService = true;
228-
}
225+
const internalOptions = (options as InternalConnectionOptions)?.[InternalConnectionOptionsSymbol] ?? {};
226+
const enableTestService = internalOptions.supportsTestService ?? false;
229227

230228
try {
231229
const runtime = Runtime.instance();

0 commit comments

Comments
 (0)