forked from CringeStudios/gamja
Add more type checks for config.json
This commit is contained in:
parent
8cc61bf577
commit
d2ac1e152a
@ -192,10 +192,12 @@ export default class App extends Component {
|
||||
let connectParams = {};
|
||||
|
||||
if (config.server) {
|
||||
connectParams.url = config.server.url;
|
||||
if (typeof config.server.url === "string") {
|
||||
connectParams.url = config.server.url;
|
||||
}
|
||||
if (Array.isArray(config.server.autojoin)) {
|
||||
connectParams.autojoin = config.server.autojoin;
|
||||
} else if (config.server.autojoin) {
|
||||
} else if (typeof config.server.autojoin === "string") {
|
||||
connectParams.autojoin = [config.server.autojoin];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user