Merge pull request #10873 from uberbrady/fix_dashboard
Don't crash JS when there are no data-export-options (as is true in Dashboard) Fixes #10872
This commit is contained in:
commit
70059f6f80
1 changed files with 2 additions and 1 deletions
|
@ -31,7 +31,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.snipe-table').bootstrapTable('destroy').each(function () {
|
$('.snipe-table').bootstrapTable('destroy').each(function () {
|
||||||
export_options = JSON.parse($(this).attr('data-export-options'));
|
data_export_options = $(this).attr('data-export-options');
|
||||||
|
export_options = data_export_options? JSON.parse(data_export_options): {};
|
||||||
export_options['htmlContent'] = true; //always enforce this on the given data-export-options (to prevent XSS)
|
export_options['htmlContent'] = true; //always enforce this on the given data-export-options (to prevent XSS)
|
||||||
|
|
||||||
$(this).bootstrapTable({
|
$(this).bootstrapTable({
|
||||||
|
|
Loading…
Add table
Reference in a new issue