From f3e95b3ea13324448032a65ad9c739f56101397c Mon Sep 17 00:00:00 2001 From: PiBa-NL Date: Wed, 19 Nov 2014 21:55:21 +0100 Subject: haproxy-devel, fix removing items from lists without first needing to edit them. --- config/haproxy-devel/haproxy_htmllist.inc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config/haproxy-devel/haproxy_htmllist.inc b/config/haproxy-devel/haproxy_htmllist.inc index 404e9fab..193728f5 100644 --- a/config/haproxy-devel/haproxy_htmllist.inc +++ b/config/haproxy-devel/haproxy_htmllist.inc @@ -327,9 +327,12 @@ function haproxy_htmllist_js(){ var view = document.getElementById("tr_view_" + rowId); var viewdetail = document.getElementById("tr_viewdetail_" + rowId); var edit = document.getElementById("tr_edit_" + rowId); - view.parentNode.removeChild(view); - viewdetail.parentNode.removeChild(viewdetail); - edit.parentNode.removeChild(edit); + if (view) + view.parentNode.removeChild(view); + if (viewdetail) + viewdetail.parentNode.removeChild(viewdetail); + if (edit) + edit.parentNode.removeChild(edit); } function removeRow(el) { var cel; -- cgit v1.2.3