Fix config file path in testclient (#882)

Also fix possible reference error when config failed to load
This commit is contained in:
asgdf
2017-03-14 20:45:46 +01:00
committed by Guangcong Luo
parent 1d5943db7f
commit df1aa4357b
2 changed files with 2 additions and 2 deletions

View File

@@ -645,7 +645,7 @@
connect: function () {
if (this.down) return;
if (Config.server.banned || Config.bannedHosts.indexOf(Config.server.host) >= 0) {
if (Config.server.banned || (Config.bannedHosts && Config.bannedHosts.indexOf(Config.server.host) >= 0)) {
this.addPopupMessage("This server has been deleted for breaking US laws, impersonating PS global staff, or other major rulebreaking.");
return;
}

View File

@@ -85,7 +85,7 @@
document.getElementById('loading-message').innerHTML += ' DONE<br />Loading data...';
</script>
<script src="https://play.pokemonshowdown.com/js/config.js"></script>
<script src="https://play.pokemonshowdown.com/config/config.js"></script>
<script src="js/battledata.js"></script>
<script src="data/pokedex-mini.js" onerror="loadRemoteData(this.src)"></script>
<script src="data/typechart.js" onerror="loadRemoteData(this.src)"></script>