diff --git a/lms/static/js/edxnotes/plugins/llm_summarize.js b/lms/static/js/edxnotes/plugins/llm_summarize.js index 2ee1e636746c..ccfd400fe090 100644 --- a/lms/static/js/edxnotes/plugins/llm_summarize.js +++ b/lms/static/js/edxnotes/plugins/llm_summarize.js @@ -97,7 +97,8 @@ annotator.subscribe('annotationEditorHidden', this.cleanupSummarize); }, handleSummarize: function (editor, annotation) { - if (!editor.options || !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'); @@ -115,7 +116,8 @@ }, body: JSON.stringify({ text_to_summarize: annotation.quote, - 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 61344e94e9db..9e8c61232baa 100644 --- a/lms/static/js/edxnotes/views/notes_factory.js +++ b/lms/static/js/edxnotes/views/notes_factory.js @@ -53,8 +53,10 @@ } }, llmSummarize: { - isEnabled: params && params.llmSummarize && params.llmSummarize.isEnabled, - courseId: params && params.llmSummarize && 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, }, }; };