From: Mischa POSLAWSKY Date: Mon, 10 Apr 2017 22:00:11 +0000 (+0200) Subject: latin: remove empty sample column X-Git-Tag: v1.10~172 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/580c94fe302ac013bd28007a5dd0be55fb3e49e8 latin: remove empty sample column --- diff --git a/latinsample.js b/latinsample.js index fa6b0f1..57e82fc 100644 --- a/latinsample.js +++ b/latinsample.js @@ -3,6 +3,10 @@ function appendsample() { for (var row of rows) { // append sample column var samplecol = row.getElementsByClassName('sample'); + if (!this.value.length) { + row.removeChild(samplecol[0]); + continue; + } if (samplecol.length) { samplecol = samplecol[0]; }