Skip to content

Commit 2dbeeb0

Browse files
committed
Refactor
1 parent f9c42bf commit 2dbeeb0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/client.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -663,10 +663,10 @@ export class Client {
663663
const text = query.text;
664664
const values = query.values || [];
665665
const options = query.options;
666-
const format = options ? options.format : undefined;
667-
const types = options ? options.types : undefined;
668-
const streams = options ? options.streams : undefined;
669-
const portal = (options ? options.portal : undefined) || '';
666+
const format = options?.format;
667+
const types = options?.types;
668+
const streams = options?.streams;
669+
const portal = options?.portal || '';
670670
const result = makeResult<T>();
671671

672672
const descriptionHandler = (description: RowDescription) => {
@@ -679,7 +679,7 @@ export class Client {
679679
};
680680

681681
if (values && values.length) {
682-
const name = (options ? options.name : undefined) || (
682+
const name = (options?.name) || (
683683
(this.config.preparedStatementPrefix ||
684684
defaults.preparedStatementPrefix) + (
685685
this.nextPreparedStatementId++

0 commit comments

Comments
 (0)