diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index 8919f7b6a7..ceb1fa045c 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -31,7 +31,8 @@ } $('.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) $(this).bootstrapTable({