From be36cbffbdcf2fcf41db1cbec9263ed4b49f116f Mon Sep 17 00:00:00 2001 From: nemunaire Date: Fri, 26 Jan 2018 11:57:12 +0100 Subject: [PATCH] frontend/public: don't require etag header --- frontend/static/js/public.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/static/js/public.js b/frontend/static/js/public.js index 1a5b2c93..4bef654e 100644 --- a/frontend/static/js/public.js +++ b/frontend/static/js/public.js @@ -125,7 +125,7 @@ angular.module("FICApp") .controller("DataController", function($scope, $http, $rootScope, $interval) { var refreshScene = function() { $http.get(window.location.pathname.replace(".html", ".json")).then(function(response) { - if ($scope.lastpublicetag == response.headers().etag) + if ($scope.lastpublicsetag != undefined && $scope.lastpublicsetag == response.headers().etag) return; $scope.lastpublicetag = response.headers().etag; @@ -134,7 +134,7 @@ angular.module("FICApp") } var refreshData = function() { $http.get("/my.json").then(function(response) { - if ($scope.lastmyetag == response.headers().etag) + if ($scope.lastmyetag != undefined && $scope.lastmyetag == response.headers().etag) return; $scope.lastmyetag = response.headers().etag; @@ -147,7 +147,7 @@ angular.module("FICApp") $scope.settings = response.data; }); $http.get("/themes.json").then(function(response) { - if ($scope.lastthemeetag == response.headers().etag) + if ($scope.lastthemeetag != undefined && $scope.lastthemeetag == response.headers().etag) return; $scope.lastthemeetag = response.headers().etag; @@ -164,7 +164,7 @@ angular.module("FICApp") }, themes); }); $http.get("/teams.json").then(function(response) { - if ($scope.lastteametag == response.headers().etag) + if ($scope.lastteametag != undefined && $scope.lastteametag == response.headers().etag) return; $scope.lastteametag = response.headers().etag;