diff --git a/src/containers/Tenant/Query/Preview/components/TopicPreview.tsx b/src/containers/Tenant/Query/Preview/components/TopicPreview.tsx index c159de9b5..ba9354721 100644 --- a/src/containers/Tenant/Query/Preview/components/TopicPreview.tsx +++ b/src/containers/Tenant/Query/Preview/components/TopicPreview.tsx @@ -55,7 +55,7 @@ export function TopicPreview({database, path}: PreviewContainerProps) { } return { start: safeParseNumber(firstPartition.startOffset), - end: safeParseNumber(firstPartition.endOffset) - 1, + end: Math.max(safeParseNumber(firstPartition.endOffset) - 1, 0), }; }, [firstPartition]);