Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Commit

Permalink
fix: do not create Udaru instnace when no need to decorate
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihai Dima committed Dec 7, 2017
1 parent a7758fa commit 7b9fe4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/plugin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const defaultConfigCore = require('../config/default.core')
function register (server, options, next) {
const config = buildConfig(defaultConfigCore, defaultConfig, options.config || {})
const { decorateUdaruCore = true } = config
const udaru = buildUdaru(options.dbPool, config)
if (decorateUdaruCore) {
const udaru = buildUdaru(options.dbPool, config)
server.decorate('request', 'udaruCore', udaru)
}
server.decorate('server', 'udaruConfig', config)
Expand Down

0 comments on commit 7b9fe4e

Please sign in to comment.