Fix user_id type comparison in location filter
Changed strict equality (===) to loose equality (==) in applyFilters() to handle user_id being returned as string "0" from API instead of number 0. This was preventing MQTT location data from being displayed on the map. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -263,8 +263,8 @@
|
||||
function applyFilters() {
|
||||
if (!allData || !allData.history) return;
|
||||
|
||||
// Nur MQTT-Daten (user_id = 0)
|
||||
let filteredData = allData.history.filter(loc => loc.user_id === 0);
|
||||
// Nur MQTT-Daten (user_id = 0 oder "0")
|
||||
let filteredData = allData.history.filter(loc => loc.user_id == 0);
|
||||
|
||||
// Apply filters in sequence
|
||||
filteredData = filterByDevice(filteredData);
|
||||
|
||||
Reference in New Issue
Block a user