Permalink
Browse files

Merge pull request #110 from soitgoes/bugfix/nullheader

Null object protection when test don't match
  • Loading branch information...
2 parents dcf5fd6 + 58bfddf commit a6e3b01b2e6f1247dde697038101fd6fa94e76b0 @nrstott committed Nov 16, 2016
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/flash/flashIdCookieProvider.js
@@ -59,9 +59,9 @@ CookieIdProvider.prototype.clear = function(req, res, flashId) {
res.headers["Set-Cookie"] = res.headers["Set-Cookie"].filter(function(el) {
return !(new RegExp("^" + flashCookieName + "=").test(el));
- });
+ }) || [];
res.headers["Set-Cookie"].push(clearCookie);
}
return res;
-};
+};

0 comments on commit a6e3b01

Please sign in to comment.