mirror of https://github.com/zlatinb/muwire
avoid an exception
parent
738f177d6c
commit
26116d313a
|
@ -113,6 +113,12 @@ class CertificateFetch {
|
||||||
var fetch = this
|
var fetch = this
|
||||||
var block = document.getElementById("certificates-" + this.divId)
|
var block = document.getElementById("certificates-" + this.divId)
|
||||||
|
|
||||||
|
if (block == null) {
|
||||||
|
// can happen if the user clicks away without hiding first
|
||||||
|
certificateFetches.delete(this.divId)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
var xmlhttp = new XMLHttpRequest()
|
var xmlhttp = new XMLHttpRequest()
|
||||||
xmlhttp.onreadystatechange = function() {
|
xmlhttp.onreadystatechange = function() {
|
||||||
if (this.readyState == 4 && this.status == 200) {
|
if (this.readyState == 4 && this.status == 200) {
|
||||||
|
|
Loading…
Reference in New Issue