only set it to 120 seconds if init is completed

This commit is contained in:
Laura Klünder 2017-12-26 23:06:57 +01:00
parent ed43b75c6e
commit 6225ab2623

View file

@ -50,7 +50,7 @@ c3nav = {
},
load_searchable_locations: function() {
$.getJSON('/api/locations/?searchable', c3nav._searchable_locations_loaded).fail(function() {
window.setTimeout(c3nav.load_searchable_locations, 120000);
window.setTimeout(c3nav.load_searchable_locations, c3nav.init_completed ? 120000 : 5000);
});
},
_searchable_locations_loaded: function(data) {