diff --git a/server/tx_search.js b/server/tx_search.js index aa59db8..d14e5b6 100644 --- a/server/tx_search.js +++ b/server/tx_search.js @@ -219,7 +219,7 @@ async function fetchTx(freq, piCode, rdsPs) { const key = `${freq}|${piCode.toUpperCase()}`; var rawMatches = piFreqIndex[key] || []; - rawMatches = [...storage.tx_search_hook[key], ...rawMatches]; + rawMatches = [...(storage.tx_search_hook[key] || []), ...rawMatches]; // Format the results into the same structure as before let filteredLocations = rawMatches.map(({ station, ...locData }) => ({