Prevent removing row even if not original row

This commit is contained in:
Florine W. Dekker 2021-11-14 11:15:30 +01:00
parent b04d4b12df
commit 389bf932ae
Signed by: FWDekker
GPG Key ID: D3DCFAA8A4560BE0
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "dice",
"version": "1.0.16",
"version": "1.0.17",
"description": "Calculates the probability of rolling a value given a combination of dice.",
"author": "F.W. Dekker",
"browser": "dist/bundle.js",

View File

@ -126,7 +126,7 @@ inputTable.addDieRow = () => {
};
inputTable.removeDieRow = index => {
if (inputTable.highestDieRowIndex() > 0) {
if (inputTable.dieRowCount() > 1) {
const table = inputTable.getTable();
const row = table.querySelector("tr[data-index=\"" + index + "\"]");
row.parentElement.removeChild(row);