Skip to content

Commit

Permalink
Now we send the error
Browse files Browse the repository at this point in the history
  • Loading branch information
zodman authored and adamghill committed Sep 17, 2020
1 parent 3f7ac76 commit a83f2bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,5 @@ venv.bak/
pip-wheel-metadata
TODO.md

node_modules/
node_modules/
tags
3 changes: 1 addition & 2 deletions django_unicorn/static/js/unicorn.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ const Unicorn = (() => {
*/
function getCsrfToken() {
const csrfElements = document.getElementsByName("csrfmiddlewaretoken");

if (csrfElements) {
if (csrfElements && csrfElements.length > 0) {
return csrfElements[0].getAttribute("value");
}

Expand Down

0 comments on commit a83f2bf

Please sign in to comment.