Well, it seems that products.data is empty. You need to make sure products.data is filled here to perform .lenght. If you probably remove the last <tr> the table is not showing anymore.
Working not properly because error is gone but one issue coming when the talblelist have not data then
show no data fount but when add the data then also showing no data found below the table after refresh the page then go
Bro i want to say that products.total is working but not proper
when delete all the list in the table show properly but when add one list in the table then still showing in the below of the table but when i refresh the page then remove other wise still below the table