From c6f1c5cd2af9bd2154f040633a09c0df0f6ad005 Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 25 Oct 2017 17:11:54 -0600 Subject: [PATCH] #351 - using listenToOnce to get rid of redundant calls --- .../resources/static/js/goatApp/controller/LessonController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js b/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js index 8fcb97c0d..216a33897 100644 --- a/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js +++ b/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js @@ -74,7 +74,7 @@ define(['jquery', this.loadLesson = function(name,pageNum) { if (this.name === name) { - this.listenTo(this.lessonHintView, 'hints:showButton', this.onShowHintsButton); + this.listenToOnce(this.lessonHintView, 'hints:showButton', this.onShowHintsButton); this.listenTo(this.lessonHintView, 'hints:hideButton', this.onHideHintsButton); this.lessonContentView.navToPage(pageNum); this.lessonHintView.hideHints();