progs/ap3.js
changeset 531 35ffb7a7eafa
parent 166 bba0504abcf0
--- a/progs/ap3.js	Mon Sep 25 17:16:56 2017 +0100
+++ b/progs/ap3.js	Tue Sep 26 10:36:19 2017 +0100
@@ -15,8 +15,7 @@
 }
 
 app.get('/', function(req, res){
-    var counter = gt_cookie(req.cookies.counter) || 0;
+    var counter = gt_cookie(req.cookies.counter || "") || 0;
     res.cookie('counter', mk_cookie(counter + 1));
     ...
 });
-