From 1206975d30075fd699bb58a97121a95b02f42c50 Mon Sep 17 00:00:00 2001
From: Antonin <antonin.murtin@gmail.com>
Date: Thu, 6 Oct 2016 21:15:16 +0200
Subject: [PATCH] Bad selector

---
 js/app/date_poll.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/js/app/date_poll.js b/js/app/date_poll.js
index 8542c82c..222da491 100644
--- a/js/app/date_poll.js
+++ b/js/app/date_poll.js
@@ -93,7 +93,7 @@ $(document).ready(function () {
     function getLastDayNumber(last_day) {
         if (last_day == null)
             last_day = $selected_days.find('fieldset').filter(':last')
-        return parseInt(/^d([0-9]+)-h[0-9]+$/.exec(last_day.find('.hours').filter(':first').attr('id'))[1])
+        return parseInt(/^d([0-9]+)-h[0-9]+$/.exec($(last_day).find('.hours').filter(':first').attr('id'))[1])
     }
 
     function newDateFields(dateStr) {
-- 
GitLab