clear tours before registering new tours

This commit is contained in:
Mads Rasmussen
2018-01-09 16:15:38 +01:00
parent ea70e18a91
commit 3858656015

View File

@@ -17,6 +17,7 @@
* Registers all tours from the server and returns a promise
*/
function registerAllTours() {
tours = [];
return tourResource.getTours().then(function(tourFiles) {
angular.forEach(tourFiles, function (tourFile) {
angular.forEach(tourFile, function(newTour) {