diff --git a/cms/static/js/views/xblock.js b/cms/static/js/views/xblock.js index cc8bb7e95e..8436ec8c3f 100644 --- a/cms/static/js/views/xblock.js +++ b/cms/static/js/views/xblock.js @@ -137,7 +137,12 @@ define(['jquery', 'underscore', 'common/js/components/utils/view_utils', 'js/vie // that at least the rendered HTML will be in place. try { return this.addXBlockFragmentResources(resources).done(function() { - blockView.updateHtml(element, html); + console.log('Updating HTML'); + try { + blockView.updateHtml(element, html); + } catch (e) { + console.error(e, e.stack); + } }); } catch (e) { console.error(e, e.stack); diff --git a/common/lib/xmodule/xmodule/js/src/conditional/display.js b/common/lib/xmodule/xmodule/js/src/conditional/display.js index 8bfda99007..3aa94908bd 100644 --- a/common/lib/xmodule/xmodule/js/src/conditional/display.js +++ b/common/lib/xmodule/xmodule/js/src/conditional/display.js @@ -149,12 +149,9 @@ } } else if (mimetype === 'application/javascript') { if (kind === 'text') { - eval.call(window, data); - console.log("JavaScript text resource eval'd", resource); + $head.append(''); } else if (kind === 'url') { - $script(data, data, function () { - console.log('JavaScript url resource loaded', resource); - }); + $script(data, data); } } else if (mimetype === 'text/html') { if (placement === 'head') {