changeset 530 | 6e08ee0d399d |
parent 178 | 13c6bd6e3477 |
--- a/progs/App4.js Sun Sep 24 18:03:21 2017 +0100 +++ b/progs/App4.js Mon Sep 25 17:16:56 2017 +0100 @@ -27,7 +27,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)); if (counter >= 5) { res.write('You are a valued customer ' +