1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Fix for Node 11.10 deprecation of require('constants').

This commit is contained in:
Ylian Saint-Hilaire 2019-02-26 15:49:44 -08:00
parent 887f2ba22e
commit 93367b159d
3 changed files with 4 additions and 4 deletions

View file

@ -59,7 +59,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
obj.meshRelayHandler = require('./meshrelay.js');
obj.meshUserHandler = require('./meshuser.js');
obj.interceptor = require('./interceptor');
const constants = require('constants');
const constants = (obj.crypto.constants ? obj.crypto.constants : require('constants')); // require('constants') is deprecated in Node 11.10, use require('crypto').constants instead.
// Variables
obj.parent = parent;