every time i try to write in search bar i have this error and table disappear

$("#search-name").keyup(function () {
        $('#employee-table tbody').html('');
        let nameKeyword = $("#search-name").val();
        employeeRef.orderBy('name', 'asc').startAt(nameKeyword).endAt(nameKeyword + "uf8ff").get()
        .then(function (documentSnapshots) {
            documentSnapshots.docs.forEach(doc => {
                renderEmployee(doc); });
            });
    });

[enter image description here][1]

–> Uncaught (in promise) ReferenceError: renderEmployee is not defined