diff options
| author | Camilo Nova <camilo.nova@gmail.com> | 2016-06-28 11:51:51 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-06-28 12:51:51 -0400 |
| commit | 222e1334bf29605925eefa45ff107ca1155e93c0 (patch) | |
| tree | 4ab8de0ebaafb0992f272624f71a0f122dc35c5c /docs/ref | |
| parent | 49b4596cb4744e4b68d56e6a540a3e15c1582963 (diff) | |
Used strict comparison in docs/ref/csrf.txt's JavaScript.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/csrf.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ref/csrf.txt b/docs/ref/csrf.txt index 7baf83f2e5..2c1b8abbf5 100644 --- a/docs/ref/csrf.txt +++ b/docs/ref/csrf.txt @@ -83,12 +83,12 @@ Acquiring the token is straightforward: // using jQuery function getCookie(name) { var cookieValue = null; - if (document.cookie && document.cookie != '') { + if (document.cookie && document.cookie !== '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = jQuery.trim(cookies[i]); // Does this cookie string begin with the name we want? - if (cookie.substring(0, name.length + 1) == (name + '=')) { + if (cookie.substring(0, name.length + 1) === (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } |
