mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 13:09:26 +00:00
Minimum node version v18 (#3170)
When the next MagicMirror version is released, node v16 will have reached its end of life.
This commit is contained in:
committed by
GitHub
parent
7dcea98e99
commit
7c64d8fce6
11
js/fetch.js
11
js/fetch.js
@@ -11,15 +11,8 @@
|
||||
* @class
|
||||
*/
|
||||
async function fetch(url, options = {}) {
|
||||
// const nodeVersion = process.version.match(/^v(\d+)\.*/)[1];
|
||||
// if (nodeVersion >= 18) {
|
||||
// // node version >= 18
|
||||
// return global.fetch(url, options);
|
||||
// } else {
|
||||
// // node version < 18
|
||||
// const nodefetch = require("node-fetch");
|
||||
// return nodefetch(url, options);
|
||||
// }
|
||||
// return global.fetch(url, options);
|
||||
|
||||
const nodefetch = require("node-fetch");
|
||||
return nodefetch(url, options);
|
||||
}
|
||||
|
Reference in New Issue
Block a user