diff options
Diffstat (limited to 'frontend/src/components/modals/custom-components/NewPortfolioModalComponent.js')
| -rw-r--r-- | frontend/src/components/modals/custom-components/NewPortfolioModalComponent.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/frontend/src/components/modals/custom-components/NewPortfolioModalComponent.js b/frontend/src/components/modals/custom-components/NewPortfolioModalComponent.js index 2d001302..19049931 100644 --- a/frontend/src/components/modals/custom-components/NewPortfolioModalComponent.js +++ b/frontend/src/components/modals/custom-components/NewPortfolioModalComponent.js @@ -19,11 +19,13 @@ class NewPortfolioModalComponent extends React.Component { } reset() { - this.textInput.value = '' - AVAILABLE_METRICS.forEach((metric) => { - this.metricCheckboxes[metric].checked = true - }) - this.repeatsInput.value = 1 + if (this.textInput) { + this.textInput.value = '' + AVAILABLE_METRICS.forEach((metric) => { + this.metricCheckboxes[metric].checked = true + }) + this.repeatsInput.value = 1 + } } onSubmit() { |
