mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00

Minimum supported Node version is 6.9.0, but Object.values() was introduced in Node < 7. Let's use a polyfill if needed. This will be removed when minimum supported Node version is raised to 8.9.0. Fixes #3459
19 lines
587 B
JavaScript
19 lines
587 B
JavaScript
/*
|
|
* TODO: this polyfill is needed for Node 6.9 support.
|
|
*
|
|
* Once minimum supported Node version is raised to 8.9.0, it will be removed.
|
|
*/
|
|
if (!Object.values) {
|
|
var log4js = require('log4js');
|
|
var statsLogger = log4js.getLogger("stats");
|
|
|
|
statsLogger.warn(`Enabling a polyfill to run on this Node version (${process.version}). Next Etherpad version will remove support for Node version < 8.9.0. Please update your runtime.`);
|
|
|
|
var values = require('object.values');
|
|
|
|
values.shim();
|
|
}
|
|
|
|
var measured = require('measured-core')
|
|
|
|
module.exports = measured.createCollection();
|