mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Create method to check if Fibers is enabled by flag DISABLE_FIBERS.
This commit is contained in:
@@ -171,3 +171,5 @@ function logErr(err) {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Meteor.isFibersEnabled = global.isFibersEnabled;
|
||||
|
||||
@@ -14,6 +14,14 @@ var MIN_NODE_VERSION = 'v14.0.0';
|
||||
|
||||
var hasOwn = Object.prototype.hasOwnProperty;
|
||||
|
||||
// For now it's a function to ensure we don't get a falsy value.
|
||||
// Once we figure out the best place to create this EV (maybe it's here),
|
||||
// it won't need to be a function anymore.
|
||||
|
||||
global.isFibersEnabled = function () {
|
||||
return !process.env.DISABLE_FIBERS;
|
||||
};
|
||||
|
||||
if (require('semver').lt(process.version, MIN_NODE_VERSION)) {
|
||||
process.stderr.write(
|
||||
'Meteor requires Node ' + MIN_NODE_VERSION + ' or later.\n');
|
||||
|
||||
Reference in New Issue
Block a user