Update validate.ts

This commit is contained in:
freearhey
2026-05-02 13:34:48 +03:00
parent 8f7940c8ca
commit 2017199983

View File

@@ -39,7 +39,7 @@ async function main() {
const streams = await parser.parse(files)
const buffer = new Dictionary<Stream>()
streams.forEach((stream: Stream) => {
if (!selectedFiles.includes(stream.filepath)) {
if (!stream.filepath || !selectedFiles.includes(stream.filepath)) {
buffer.set(stream.url, stream)
}
})
@@ -70,7 +70,7 @@ async function main() {
log.add({
type: 'error',
line: stream.getLine(),
message: `"${stream.url}" is already in the "${origin.filepath}"`
message: `"${stream.url}" is already in the "${origin?.filepath}"`
})
} else {
buffer.set(stream.url, stream)