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:52:05 -0400 |
| commit | 87584a0af162aa6c84ef40613fdab090e970bf20 (patch) | |
| tree | 0c89971ea0249866d034eadeab8f663a158e2dda /docs/ref | |
| parent | 28de25c249754401eaf237159ab88bb67577396a (diff) | |
[1.10.x] Used strict comparison in docs/ref/csrf.txt's JavaScript.
Backport of 222e1334bf29605925eefa45ff107ca1155e93c0 from master
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 5b87d6f1c8..3308b868dc 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; } |
