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

Commit f3ad271

Browse files
committed
eBookConfig is not available until after document.ready
1 parent cb10c01 commit f3ad271

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

runestone/common/js/bookfuncs.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,13 @@ function addDelay(directive, action, delay) {
243243

244244

245245
// initialize stuff
246-
if (eBookConfig.useRunestoneServices) {
247-
$(document).ready(handleLoginLogout);
248-
$(document).ready(getNumUsers);
249-
$(document).ready(getOnlineUsers);
250-
}
246+
$(document).ready(function() {
247+
if (eBookConfig.useRunestoneServices) {
248+
$(document).ready(handleLoginLogout);
249+
$(document).ready(getNumUsers);
250+
$(document).ready(getOnlineUsers);
251+
}
252+
});
251253

252254
// misc stuff
253255
// todo: This could be further distributed but making a video.js file just for one function seems dumb.

0 commit comments

Comments
 (0)