Merge pull request #633 from MITx/feature/ichuang/histogram-try-catch
put try-catch around histogram coffeescript code
This commit is contained in:
@@ -14,4 +14,9 @@ class @Courseware
|
|||||||
XModule.loadModules('display')
|
XModule.loadModules('display')
|
||||||
$('.course-content .histogram').each ->
|
$('.course-content .histogram').each ->
|
||||||
id = $(this).attr('id').replace(/histogram_/, '')
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user