Prevent removing row even if not original row
parent
b04d4b12df
commit
389bf932ae
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue