diff --git a/src/CompanyManagement.js b/src/CompanyManagement.js index ba818dacf..68eee692b 100644 --- a/src/CompanyManagement.js +++ b/src/CompanyManagement.js @@ -7,7 +7,7 @@ import {Player} from "./Player"; import Decimal from "decimal.js"; import {dialogBoxCreate} from "../utils/DialogBox"; -import {clearSelector} from "../utils/HelperFunctions"; +import {clearSelector} from "../utils/uiHelpers/clearSelector"; import {Reviver, Generic_toJSON, Generic_fromJSON} from "../utils/JSONReviver"; import numeral from "numeral/min/numeral.min"; @@ -4924,3 +4924,4 @@ Corporation.fromJSON = function(value) { Reviver.constructors.Corporation = Corporation; export {Corporation}; + diff --git a/utils/HelperFunctions.js b/utils/HelperFunctions.js index b76317be7..69f4e8891 100644 --- a/utils/HelperFunctions.js +++ b/utils/HelperFunctions.js @@ -27,11 +27,4 @@ function createAccordionElement(params) { return [li, hdr, panel]; } -function clearSelector(selector) { - for (var i = selector.options.length - 1; i >= 0; --i) { - selector.remove(i); - } -} - -export {createAccordionElement, - clearSelector}; +export {createAccordionElement}; diff --git a/utils/uiHelpers/clearSelector.ts b/utils/uiHelpers/clearSelector.ts new file mode 100644 index 000000000..39e087bc0 --- /dev/null +++ b/utils/uiHelpers/clearSelector.ts @@ -0,0 +1,9 @@ +/** + * Clears all