latin: remove empty sample column
[sheet.git] / latinsample.js
index fa6b0f1ca60af7e6cae33a5dce46eb2b0fb8df5a..57e82fc0cf7759e9b7fa3093e059acf3f56c2be6 100644 (file)
@@ -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];
                }