Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 04beda5

Browse files
committed
if eBookConfig is not defined even after document.ready then something is really wrong.
1 parent c8c831d commit 04beda5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

runestone/common/js/bookfuncs.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,14 @@ function addDelay(directive, action, delay) {
244244

245245
// initialize stuff
246246
$(document).ready(function() {
247-
if (eBookConfig.useRunestoneServices) {
247+
if (eBookConfig && eBookConfig.useRunestoneServices) {
248248
$(document).ready(handleLoginLogout);
249249
$(document).ready(getNumUsers);
250250
$(document).ready(getOnlineUsers);
251+
} else {
252+
if (typeof eBookConfig === 'undefined') {
253+
console.log("eBookConfig is not defined. This page must not be set up for Runestone");
254+
}
251255
}
252256
});
253257

0 commit comments

Comments
 (0)