diff --git a/public/js/pages/Calendar/View.js b/public/js/pages/Calendar/View.js index c74b4f96a..353f05c59 100644 --- a/public/js/pages/Calendar/View.js +++ b/public/js/pages/Calendar/View.js @@ -71,7 +71,7 @@ document.addEventListener('DOMContentLoaded', function () { }); - $.post(requestUrl, {visibleCalendars: visibleCalendars,visibleCancellation:1}, function (data) { + $.post(requestUrl, {visibleCalendars: visibleCalendars, visibleCancellation: 1}, function (data) { }, 'json').done(function (json) { if (json.success == true) { @@ -1007,7 +1007,9 @@ if (typeof (EventSource) !== 'undefined') { }); calendarFilter.each(function () { if (!$(this).hasClass('top-search-filter')) { - visibleCalendarTypes.push(parseInt($(this).data('ctype'))); + if ($(this).data('ctype')) { + visibleCalendarTypes.push(parseInt($(this).data('ctype'))); + } } }); jsondata = JSON.parse(e.data);