We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f7ac76 commit a83f2bfCopy full SHA for a83f2bf
.gitignore
@@ -109,4 +109,5 @@ venv.bak/
109
pip-wheel-metadata
110
TODO.md
111
112
-node_modules/
+node_modules/
113
+tags
django_unicorn/static/js/unicorn.js
@@ -41,8 +41,7 @@ const Unicorn = (() => {
41
*/
42
function getCsrfToken() {
43
const csrfElements = document.getElementsByName("csrfmiddlewaretoken");
44
-
45
- if (csrfElements) {
+ if (csrfElements && csrfElements.length > 0) {
46
return csrfElements[0].getAttribute("value");
47
}
48
0 commit comments