mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Don't crash JS when there are no data-export-options (as is true in Dashboard)
This commit is contained in:
parent
639409fb3f
commit
e50ad8a442
|
@ -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…
Reference in a new issue