From 4b1eba0eb6715d65ae81f74ee4d2fb5f3ce8c5c6 Mon Sep 17 00:00:00 2001 From: Serafin-dev Date: Fri, 11 Oct 2024 13:31:58 -0300 Subject: [PATCH] minor --- lms/static/js/edxnotes/plugins/llm_summarize.js | 8 ++++---- lms/static/js/edxnotes/views/notes_factory.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lms/static/js/edxnotes/plugins/llm_summarize.js b/lms/static/js/edxnotes/plugins/llm_summarize.js index ccfd400fe09..abc499c802f 100644 --- a/lms/static/js/edxnotes/plugins/llm_summarize.js +++ b/lms/static/js/edxnotes/plugins/llm_summarize.js @@ -97,8 +97,8 @@ annotator.subscribe('annotationEditorHidden', this.cleanupSummarize); }, handleSummarize: function (editor, annotation) { - // if (!editor.options || !editor.options.isSummarizing) return; - if (!editor.options?.isSummarizing) return; + if (!editor.options || !editor.options.isSummarizing) return; + // if (!editor.options?.isSummarizing) return; function toggleLoader() { const saveButton = document.querySelector('.annotator-controls .annotator-save'); @@ -116,8 +116,8 @@ }, body: JSON.stringify({ text_to_summarize: annotation.quote, - course_id: editor.options?.llmSummarize?.courseId, - // course_id: editor.options && editor.options.llmSummarize && editor.options.llmSummarize.courseId, + // course_id: editor.options?.llmSummarize?.courseId, + course_id: editor.options && editor.options.llmSummarize && editor.options.llmSummarize.courseId, }), }); diff --git a/lms/static/js/edxnotes/views/notes_factory.js b/lms/static/js/edxnotes/views/notes_factory.js index 9e8c61232ba..7b0869447ad 100644 --- a/lms/static/js/edxnotes/views/notes_factory.js +++ b/lms/static/js/edxnotes/views/notes_factory.js @@ -53,10 +53,10 @@ } }, llmSummarize: { - // isEnabled: params && params.llmSummarize && params.llmSummarize.isEnabled, - // courseId: params && params.llmSummarize && params.llmSummarize.courseId, - isEnabled: params?.llmSummarize?.isEnabled, - courseId: params?.llmSummarize?.courseId, + isEnabled: params && params.llmSummarize && params.llmSummarize.isEnabled, + courseId: params && params.llmSummarize && params.llmSummarize.courseId, + // isEnabled: params?.llmSummarize?.isEnabled, + // courseId: params?.llmSummarize?.courseId, }, }; };