From 570f5f9602243f99668d8c9fcd8df588584712b8 Mon Sep 17 00:00:00 2001 From: akvlad Date: Wed, 14 Feb 2024 11:03:02 +0200 Subject: [PATCH] check if e is undefined --- parser/registry/parser_registry/drop.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser/registry/parser_registry/drop.js b/parser/registry/parser_registry/drop.js index f98e2fcc..f8a77909 100644 --- a/parser/registry/parser_registry/drop.js +++ b/parser/registry/parser_registry/drop.js @@ -30,7 +30,7 @@ const viaClickhouseQuery = (token, query) => { const viaStream = (token, query) => { const labelsToDrop = token.Children('label').map(l => l.value) addStream(query, (s) => s.map(e => { - if (!e.labels) { + if (!e || !e.labels) { return e } for (const l of labelsToDrop) { @@ -44,4 +44,4 @@ const viaStream = (token, query) => { module.exports = { viaClickhouseQuery, viaStream -} \ No newline at end of file +}