trails icon indicating copy to clipboard operation
trails copied to clipboard

V3 `this.app.config.get` doesn't behave as expected

Open matteozambon89 opened this issue 7 years ago • 1 comments

@jaumard I think I found another issue with the config.

On trailpack-koa I have:

// index.js
...
configure() {
...
// line 56
this.app.config.set('web', result[1])
...
}
...

which updates the current configuration with various defaults and checks using JOI.

Now if on my app or another trailpack I see this result:

this.app.config.get('web.server') // undefined
this.app.config.get.web.server // 'koa'

I've been careful to ask for this config value after trailpack-koa 's configure method is completed.

matteozambon89 avatar Mar 07 '18 23:03 matteozambon89

Try with the last version v3.2.1 do you still have the issue ?

jaumard avatar Mar 21 '18 20:03 jaumard