Browse Source

Fix little error consequent to closing_time chagnes..

Jean-Baptiste (Rorist) Aubort 5 years ago
parent
commit
b91524dcc7
1 changed files with 1 additions and 0 deletions
  1. 1 0
      main.js

+ 1 - 0
main.js

@@ -103,6 +103,7 @@ function updateSpaceInformation() {
 }
 
 function calcDiff() {
+    if(closing_time == undefined) return new Date(0);
     var diff_time = Number(closing_time.getTime()) - new Date().getTime();
     if (diff_time > 0) {
         return new Date(diff_time);