From 218b83c69f2b5b5b399fe0959b55751fe3280fad Mon Sep 17 00:00:00 2001 From: Oliver Foster Date: Thu, 28 Apr 2022 16:24:36 +0100 Subject: [PATCH] issue/2799 Removed redundant behaviour (#67) --- js/adapt-contrib-assessmentResults.js | 4 ++-- js/assessmentResultsView.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/js/adapt-contrib-assessmentResults.js b/js/adapt-contrib-assessmentResults.js index 9c0e6e8..c0f94bf 100644 --- a/js/adapt-contrib-assessmentResults.js +++ b/js/adapt-contrib-assessmentResults.js @@ -1,8 +1,8 @@ -import Adapt from 'core/js/adapt'; +import components from 'core/js/components'; import AssessmentResultsModel from './assessmentResultsModel'; import AssessmentResultsView from './assessmentResultsView'; -export default Adapt.register('assessmentResults', { +export default components.register('assessmentResults', { model: AssessmentResultsModel, view: AssessmentResultsView }); diff --git a/js/assessmentResultsView.js b/js/assessmentResultsView.js index dbd0ea4..0169a3e 100644 --- a/js/assessmentResultsView.js +++ b/js/assessmentResultsView.js @@ -1,4 +1,5 @@ import Adapt from 'core/js/adapt'; +import router from 'core/js/router'; import ComponentView from 'core/js/views/componentView'; class AssessmentResultsView extends ComponentView { @@ -38,7 +39,7 @@ class AssessmentResultsView extends ComponentView { if (!wasReset) return; if (this.model.get('_retry')._routeToAssessment !== true) return; - Adapt.navigateToElement(`.${state.articleId}`); + router.navigateToElement(`.${state.articleId}`); }); }