From 2cf9f0bd7018a536061ea277df3158bc846fe241 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Thu, 29 Sep 2016 22:22:04 +0200 Subject: Fix timelineheader.firstChild being undefined --- modules/changes/changes.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/changes/changes.html') diff --git a/modules/changes/changes.html b/modules/changes/changes.html index bd9b436..5dbcc6d 100644 --- a/modules/changes/changes.html +++ b/modules/changes/changes.html @@ -83,7 +83,8 @@ function makeURLtr(url){ ev.stopPropagation(); if(!confirm("Delete the following url?\n"+url))return; fetch("DELETE","/changes/url",url,function(status,body){ - if(document.getElementById("timelineheader").firstChild.nodeValue==url){ + var tlh=document.getElementById("timelineheader"); + if(tlh.firstChild&&tlh.firstChild.nodeValue==url){ document.getElementById("timelinecontainer").classList.remove("visible"); } if(status!=200){ -- cgit v1.2.3-54-g00ecf