X-Git-Url: http://git.scottworley.com/inverse-tax/blobdiff_plain/d0678fe5d5c229220e1b4e7e7cbd470b157c3261..e66063161c51b0956d2ff3acabf778e8f2b4d045:/tax_ui.js?ds=inline diff --git a/tax_ui.js b/tax_ui.js index 4f2b625..0117dcc 100644 --- a/tax_ui.js +++ b/tax_ui.js @@ -1,6 +1,8 @@ -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)); +"use strict"; + +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) {