summaryrefslogtreecommitdiff
path: root/src/scripts/controllers/simulationcontroller.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts/controllers/simulationcontroller.ts')
-rw-r--r--src/scripts/controllers/simulationcontroller.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/scripts/controllers/simulationcontroller.ts b/src/scripts/controllers/simulationcontroller.ts
index bb46575c..2652d5d4 100644
--- a/src/scripts/controllers/simulationcontroller.ts
+++ b/src/scripts/controllers/simulationcontroller.ts
@@ -297,7 +297,11 @@ export class SimulationController {
});
});
- $("#new-experiment-btn").click(() => {
+ let newExperimentBtn = $("#new-experiment-btn");
+ // Remove previously added event handlers
+ newExperimentBtn.off();
+
+ newExperimentBtn.click(() => {
const nameInput = $("#new-experiment-name-input");
if (nameInput.val() === "") {
$(".experiment-name-alert").show();