Fix ReferenceError: Cannot access 'renderObsList' before initialization by converting arrow functions to standard hoisted functions
This commit is contained in:
+3
-3
@@ -2387,16 +2387,16 @@ const initApp = () => {
|
||||
if (obsSearchCrianca) obsSearchCrianca.addEventListener('input', renderObsList);
|
||||
|
||||
// Preenche select de meses
|
||||
const populateMonthFilter = () => {
|
||||
function populateMonthFilter() {
|
||||
if (!obsFilterMes) return;
|
||||
const months = [...new Set(allObservations.map(o => o.date?.slice(0, 7)))]
|
||||
.filter(Boolean).sort().reverse();
|
||||
obsFilterMes.innerHTML = '<option value="">Todos os meses</option>' +
|
||||
months.map(m => `<option value="${m}">${m.split('-')[1]}/${m.split('-')[0]}</option>`).join('');
|
||||
};
|
||||
}
|
||||
|
||||
// Renderiza lista filtrada
|
||||
const renderObsList = () => {
|
||||
function renderObsList() {
|
||||
if (!obsList) return;
|
||||
const mes = obsFilterMes?.value || '';
|
||||
const tag = obsFilterTag?.value || '';
|
||||
|
||||
Reference in New Issue
Block a user