Skip to content

Commit

Permalink
Add configurable options to defineProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
Freddy committed Sep 3, 2018
1 parent f88c9ba commit 83a394b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,15 @@ function ial(app, opts) {

debug('app.ctx.i18n %j', i18n)
return i18n
}
},
configurable: true
})

Object.defineProperty(app.request, 'i18n', {
get: function () {
return this.ctx.i18n
}
},
configurable: true
})

return function i18nMiddleware(ctx, next) {
Expand Down

0 comments on commit 83a394b

Please sign in to comment.