Skip to content

Commit

Permalink
refactor(index): use Object.hasOwn() (#192)
Browse files Browse the repository at this point in the history
Signed-off-by: Frazer Smith <frazer.dev@icloud.com>
  • Loading branch information
Fdawgs authored Oct 19, 2024
1 parent 1c125d7 commit e2c4ae6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function fastifyBearerAuth (fastify, options, done) {
options = { addHook: true, verifyErrorLogLevel: 'error', ...options }

if (
Object.prototype.hasOwnProperty.call(fastify.log, 'error') === false ||
Object.hasOwn(fastify.log, 'error') === false ||
typeof fastify.log.error !== 'function'
) {
options.verifyErrorLogLevel = null
Expand All @@ -18,7 +18,7 @@ function fastifyBearerAuth (fastify, options, done) {
options.verifyErrorLogLevel != null &&
(
typeof options.verifyErrorLogLevel !== 'string' ||
Object.prototype.hasOwnProperty.call(fastify.log, options.verifyErrorLogLevel) === false ||
Object.hasOwn(fastify.log, options.verifyErrorLogLevel) === false ||
typeof fastify.log[options.verifyErrorLogLevel] !== 'function'
)
) {
Expand Down

0 comments on commit e2c4ae6

Please sign in to comment.