Commit 08e98db6 by ichuang

put try-catch around histogram coffeescript code

parent 392e2681
......@@ -14,4 +14,9 @@ class @Courseware
XModule.loadModules('display')
$('.course-content .histogram').each ->
id = $(this).attr('id').replace(/histogram_/, '')
new Histogram id, $(this).data('histogram')
try
histg = new Histogram id, $(this).data('histogram')
catch error
histg = error
console.log(error)
return histg
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment