From e443f001d3602c241ebb788466b76f89e208dd99 Mon Sep 17 00:00:00 2001 From: zimv <472953586@qq.com> Date: Thu, 30 Sep 2021 10:17:54 +0800 Subject: [PATCH] Fix tracePage browser crash Signed-off-by: zimv <472953586@qq.com> --- packages/jaeger-ui/src/utils/span-ancestor-ids.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/jaeger-ui/src/utils/span-ancestor-ids.tsx b/packages/jaeger-ui/src/utils/span-ancestor-ids.tsx index a3fe0d7e72..4b367e516e 100644 --- a/packages/jaeger-ui/src/utils/span-ancestor-ids.tsx +++ b/packages/jaeger-ui/src/utils/span-ancestor-ids.tsx @@ -22,7 +22,11 @@ function getFirstAncestor(span: Span): Span | TNil { return _get( _find( span.references, - ({ span: ref, refType }) => ref && ref.spanID && (refType === 'CHILD_OF' || refType === 'FOLLOWS_FROM') + ({ span: ref, refType }) => + ref && + ref.spanID && + ref.spanID !== span.spanID && + (refType === 'CHILD_OF' || refType === 'FOLLOWS_FROM') ), 'span' );