-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* | ||
* 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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters