J3RN / time-tracker

A time tracking application
http://timesheet.j3rn.com
MIT License
6 stars 14 forks source link

Stop polling if 'filterDate' is undefined #117

Closed J3RN closed 6 years ago

J3RN commented 6 years ago

This script is only intended to be run on the TimeEntries#index page. Unfortunately, it runs on every page, which results in a lot of queries to the server with the GET parameter date=undefined. By checking that filterDate is truthy (i.e. not undefined or some other not-date things), we should be reasonably confident that the date being sent to the server is probably actually a date.