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, }, }; };