mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 19:05:01 -05:00
Add more type checks for config.json
This commit is contained in:
parent
8cc61bf577
commit
d2ac1e152a
1 changed files with 4 additions and 2 deletions
|
@ -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…
Reference in a new issue