X-Git-Url: http://git.scottworley.com/inverse-tax/blobdiff_plain/f0d014934e5c2ddeff4cdb62f609a76cae50ac8e..e66063161c51b0956d2ff3acabf778e8f2b4d045:/tax_ui.js diff --git a/tax_ui.js b/tax_ui.js index 57bd361..0117dcc 100644 --- a/tax_ui.js +++ b/tax_ui.js @@ -1,8 +1,8 @@ "use strict"; -function load_tax_table(table_id, deductible_id) { - return apply_deductible(parse_tax_table(document.getElementById(table_id).value), - parseFloat(document.getElementById(deductible_id).value)); +function load_tax_table(table_id, deductible_id = null) { + const deductible = deductible_id == null ? 0.0 : parseFloat(document.getElementById(deductible_id).value); + return apply_deductible(parse_tax_table(document.getElementById(table_id).value), deductible); } function format_number(n) {