Add comment about methods not re-bound

This commit is contained in:
josieusa 2017-01-05 17:12:50 +01:00
parent dee3e4e89e
commit 7196f0148e
1 changed files with 6 additions and 0 deletions

View File

@ -79,6 +79,12 @@ LoopBackContext.createContext = function(scopeName) {
// Set up LoopBackContext.getCurrentContext()
LoopBackContext.getCurrentContext = function() {
if (ns && ns.active) {
/**
* **NOTE**
* This only re-binds get and set methods, the most used.
* If you use other methods of the context, e.g. runInContext(), etc.,
* you may run into unexpected issues that are fixed only for get, set.
*/
var boundMethods = {
get: ns.bind(ns.get),
set: ns.bind(ns.set),