diff --git a/packages/meteor/dynamics_nodejs.js b/packages/meteor/dynamics_nodejs.js index 2a278acd5e..fe0ca03287 100644 --- a/packages/meteor/dynamics_nodejs.js +++ b/packages/meteor/dynamics_nodejs.js @@ -200,6 +200,9 @@ const bindEnvironmentFibers = (func, onException, _this) => { }; }; +// This function has two reasons: +// 1. Return the function to be executed on the MeteorJS context, having it assinged in the async localstorage. +// 2. Better error handling, the error message will be more clear. const bindEnvironmentAsync = (func, onException, _this) => { var dynamics = Meteor._getValueFromAslStore("_meteor_dynamics"); var boundValues = Array.isArray(dynamics) ? dynamics.slice() : [];