mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-30 08:52:49 -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)) {
|
if (!localIdMap.has(link)) {
|
||||||
let counter = 0
|
let counter = 0
|
||||||
let newId
|
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()
|
.toLowerCase()
|
||||||
.replace(/[^\w]/g, '')
|
.replace(/[^\w]/g, '')
|
||||||
.replace(/^the|^https?(www)?/, '')
|
.replace(/^the|^https?(www)?/, '')
|
||||||
|
|||||||
Reference in New Issue
Block a user