Skip to content

Commit 516adb3

Browse files
authored
MBS-10562: Add null check for chat button in modal_init (#10)
1 parent 5a073c5 commit 516adb3

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

amd/build/ai_control.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/build/ai_control.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/src/ai_control.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ let baseElement = null;
3636
*/
3737
export const init = async(selector) => {
3838
baseElement = document.querySelector(selector);
39+
if (!baseElement) {
40+
return;
41+
}
3942
const contextid = baseElement.dataset.contextid;
4043
const infoArea = baseElement.querySelector('[data-aicontrol="info"]');
4144
const controlArea = baseElement.querySelector('[data-aicontrol="config"]');

0 commit comments

Comments
 (0)