Skip to content

Firefly III: a personal finances manager

Fix JS error.

James Colee26d797d5796
diff --git a/public/js/reports.js b/public/js/reports.js
index 3eba2fcff4..a9573ef06a 100644
--- a/public/js/reports.js
+++ b/public/js/reports.js
@@ -5,16 +5,19 @@ $(function () {
"use strict";
drawChart();
- picker = $('#inputDateRange').daterangepicker(
- {
- locale: {
- format: 'YYYY-MM-DD',
- firstDay: 1,
- },
- minDate: minDate,
- drops: 'up',
- }
- );
+ if ($('#inputDateRange').length > 0) {
+
+ picker = $('#inputDateRange').daterangepicker(
+ {
+ locale: {
+ format: 'YYYY-MM-DD',
+ firstDay: 1,
+ },
+ minDate: minDate,
+ drops: 'up',
+ }
+ );
+ }
// set values from cookies, if any:
if (readCookie('report-type') !== null) {