mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-06 05:27:54 -05:00
Fix support for Node 0.12
Update the detection of legacy engines, as Node 0.12 has native Map support enabled by default
This commit is contained in:
parent
42ea92bc53
commit
db4eec3e2a
4
app.js
4
app.js
|
|
@ -56,7 +56,7 @@ function runNpm(command) {
|
|||
process.exit(0);
|
||||
}
|
||||
|
||||
var isLegacyEngine = !global.Map;
|
||||
var isLegacyEngine = !(''.includes);
|
||||
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
|
@ -66,7 +66,7 @@ try {
|
|||
} catch (e) {
|
||||
runNpm('install --production');
|
||||
}
|
||||
if (isLegacyEngine && !new Map().set()) {
|
||||
if (isLegacyEngine && !(''.includes)) {
|
||||
runNpm('update --production');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
require('sugar');
|
||||
if (!global.Map) require('es6-shim');
|
||||
if (!''.includes) require('es6-shim');
|
||||
|
||||
global.Config = require('./config/config.js');
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ if (!process.send) {
|
|||
};
|
||||
} else {
|
||||
require('sugar');
|
||||
if (!global.Map) require('es6-shim');
|
||||
if (!''.includes) require('es6-shim');
|
||||
global.Config = require('./config/config.js');
|
||||
|
||||
if (Config.crashguard) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user