We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35265b1 commit 1158f72Copy full SHA for 1158f72
1 file changed
bases/rsptx/interactives/runestone/common/js/pretext.js
@@ -30,7 +30,13 @@ function setupPTXEvents() {
30
let container = btn.closest(".sagecell-sage");
31
let codeInput = container ? container.querySelector(".sagecell_input") : null;
32
let code = codeInput ? codeInput.textContent : "";
33
- rb.logBookEvent({ event: "sage", act: "run", div_id: container ? container.id : null });
+ let div_id = container ? container.id : null;
34
+ if (! div_id) {
35
+ console.warn("Could not find container or div_id for sagecell button");
36
+ return;
37
+ }
38
+
39
+ rb.logBookEvent({ event: "sage", act: "run", div_id: div_id });
40
});
41
42
if (typeof eBookConfig !== "undefined" && !eBookConfig.isInstructor) {
0 commit comments