mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-26 15:12:47 -05:00
Fix crash when attempting to id empty stream
This commit is contained in:
@@ -84,7 +84,12 @@ export class StreamIDGenerator {
|
||||
if (!localIdMap.has(link)) {
|
||||
let counter = 0
|
||||
let newId
|
||||
const normalizedText = (source || label || link)
|
||||
const idBase = source || label || link
|
||||
if (!idBase) {
|
||||
console.warn('skipping empty stream', stream)
|
||||
continue
|
||||
}
|
||||
const normalizedText = idBase
|
||||
.toLowerCase()
|
||||
.replace(/[^\w]/g, '')
|
||||
.replace(/^the|^https?(www)?/, '')
|
||||
|
||||
Reference in New Issue
Block a user