Skip to content

Commit

Permalink
fix(context): bind context to global functions
Browse files Browse the repository at this point in the history
global functions should always get context scope
  • Loading branch information
thetutlage committed Aug 8, 2017
1 parent 26e2f70 commit e0a2685
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Context/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class Context {
if (value === undefined) {
debug('resolving %s key on globals', key)
value = _.get(this.$globals, key)
value = typeof (value) === 'function' ? value.bind(this) : value
}

return value
Expand Down

0 comments on commit e0a2685

Please sign in to comment.