Skip to content

Commit

Permalink
Fix getCookie
Browse files Browse the repository at this point in the history
  • Loading branch information
Mortal committed Mar 2, 2017
1 parent 0ff3c32 commit 4bc5d97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stopwatch/static/stopwatch/stopwatch.es6
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ function window_click(ev) {

// getCookie from https://docs.djangoproject.com/en/1.4/ref/contrib/csrf/
function getCookie(name) {
const cookies = (document.cookie || '').split(';').map(String.trim);
const cookies = (document.cookie || '').split(';').map((s) => s.trim());
for (const cookie of cookies) {
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) === (name + '='))
Expand Down

0 comments on commit 4bc5d97

Please sign in to comment.