Commit ae8a1af9 by David Ormsbee

Merge pull request #633 from MITx/feature/ichuang/histogram-try-catch

put try-catch around histogram coffeescript code
parents c34ab0dc 08e98db6
......@@ -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