Skip to content

Commit a83f2bf

Browse files
zodmanadamghill
authored andcommitted
Now we send the error
1 parent 3f7ac76 commit a83f2bf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,5 @@ venv.bak/
109109
pip-wheel-metadata
110110
TODO.md
111111

112-
node_modules/
112+
node_modules/
113+
tags

django_unicorn/static/js/unicorn.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ const Unicorn = (() => {
4141
*/
4242
function getCsrfToken() {
4343
const csrfElements = document.getElementsByName("csrfmiddlewaretoken");
44-
45-
if (csrfElements) {
44+
if (csrfElements && csrfElements.length > 0) {
4645
return csrfElements[0].getAttribute("value");
4746
}
4847

0 commit comments

Comments
 (0)