mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Don't start routing before servers has been loaded
This commit is contained in:
parent
12cab35055
commit
e4d42d4b2a
@ -39,5 +39,4 @@ require.config({
|
||||
|
||||
require(['jquery', 'bootstrap', 'backbone', 'app/router'], function ($, Bootstrap, Backbone, Router) {
|
||||
var router = new Router();
|
||||
Backbone.history.start();
|
||||
});
|
||||
|
@ -37,12 +37,19 @@ define(function (require) {
|
||||
sweetAlertInitialize();
|
||||
missions.fetch();
|
||||
|
||||
var initialized = false;
|
||||
|
||||
var socket = io.connect();
|
||||
socket.on('mods', function (_mods) {
|
||||
mods.set(_mods);
|
||||
});
|
||||
socket.on('servers', function (_servers) {
|
||||
servers.set(_servers);
|
||||
|
||||
if (!initialized) {
|
||||
initialized = true;
|
||||
Backbone.history.start();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user