Skip to content

Commit 5bb4c9c

Browse files
authored
perf(index): use optional chaining (#191)
Signed-off-by: Frazer Smith <frazer.dev@icloud.com>
1 parent 5b86008 commit 5bb4c9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function fastifyPostgres (fastify, options, next) {
125125
}
126126

127127
fastify.addHook('onRoute', routeOptions => {
128-
const transact = routeOptions && routeOptions.pg && routeOptions.pg.transact
128+
const transact = routeOptions?.pg?.transact
129129

130130
if (
131131
!transact ||

0 commit comments

Comments
 (0)