Fix merge conflict

This commit is contained in:
Matheus Castro
2022-10-31 21:22:18 -03:00
parent 38ff1d6e72
commit 47d4e825e7

View File

@@ -121,31 +121,6 @@ class EnvironmentVariableAsync {
*/
Meteor.EnvironmentVariable = Meteor._isFibersEnabled ? EnvironmentVariableFibers : EnvironmentVariableAsync;
/**
* @summary Set the environment variable to the given value while a function is run
* @locus Anywhere
* @method withValueAsync
* @memberof Meteor.EnvironmentVariable
* @param {Any} value Value the environment variable should be set to
* @param {Function} func The function to run
* @return {Any} Return value of function
*/
EVp._set = function (context) {
Meteor._nodeCodeMustBeInFiber();
Fiber.current._meteor_dynamics[this.slot] = context;
};
EVp._setNewContextAndGetCurrent = function (value) {
Meteor._nodeCodeMustBeInFiber();
if (!Fiber.current._meteor_dynamics) {
Fiber.current._meteor_dynamics = [];
}
const saved = Fiber.current._meteor_dynamics[this.slot];
this._set(value);
return saved;
};
// Meteor application code is always supposed to be run inside a
// fiber. bindEnvironment ensures that the function it wraps is run from
// inside a fiber and ensures it sees the values of Meteor environment