From 15abf85a3fd9bb143719dfe2b7c8904853f34078 Mon Sep 17 00:00:00 2001 From: molotgor Date: Thu, 16 Jan 2025 12:27:32 +0400 Subject: [PATCH] fix display empty in Table mode --- src/stores/JSONViewer/JSONViewerStore.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/stores/JSONViewer/JSONViewerStore.ts b/src/stores/JSONViewer/JSONViewerStore.ts index cea7b2a6..61925001 100644 --- a/src/stores/JSONViewer/JSONViewerStore.ts +++ b/src/stores/JSONViewer/JSONViewerStore.ts @@ -449,13 +449,15 @@ export class JSONViewerStore { .flatMap(node => [ ...this.chunksHeights.default.filter( chunkData => + this.isCompare && chunkData.height > 0 && chunkData.lastElement === '' && chunkData.firstElement === node.id, ), node, ...this.chunksHeights.default.filter( - chunkData => chunkData.height > 0 && chunkData.lastElement === node.id, + chunkData => + this.isCompare && chunkData.height > 0 && chunkData.lastElement === node.id, ), ]), ], @@ -468,13 +470,15 @@ export class JSONViewerStore { .flatMap(node => [ ...this.chunksHeights.compare.filter( chunkData => + this.isCompare && chunkData.height > 0 && chunkData.lastElement === '' && chunkData.firstElement === node.id, ), node, ...this.chunksHeights.compare.filter( - chunkData => chunkData.height > 0 && chunkData.lastElement === node.id, + chunkData => + this.isCompare && chunkData.height > 0 && chunkData.lastElement === node.id, ), ]), ],