Skip to content

Commit ab5ef9a

Browse files
committed
Fix possible access to null jqXHR.responseText
1 parent ea5e67c commit ab5ef9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/templates/home.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
else if (jqXHR.responseJSON) {
6161
msg = jqXHR.responseJSON.replace(/\n/g, "<br/>").replace(/ /g, "&nbsp;");
6262
}
63-
else if (jqXHR.responseText.indexOf("<p>The CSRF token is invalid.</p>") != -1) {
63+
else if (jqXHR.responseText && jqXHR.responseText.indexOf("<p>The CSRF token is invalid.</p>") != -1) {
6464
msg = "The CSRF token is invalid. Please reload this page and retry.";
6565
}
6666
else if (jqXHR.responseText) {

0 commit comments

Comments
 (0)