From 14f71e80d30d72631b4ca53e2499b55002cb9ab7 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Thu, 1 Sep 2022 13:35:51 +0200 Subject: [PATCH] skip loading data without columns --- packages/datalib/src/PerspectiveDataLoader.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/datalib/src/PerspectiveDataLoader.ts b/packages/datalib/src/PerspectiveDataLoader.ts index be5fd7c4..20f13ab7 100644 --- a/packages/datalib/src/PerspectiveDataLoader.ts +++ b/packages/datalib/src/PerspectiveDataLoader.ts @@ -96,6 +96,10 @@ export class PerspectiveDataLoader { async loadData(props: PerspectiveDataLoadProps) { const { schemaName, pureName, bindingColumns, bindingValues, dataColumns, orderBy, condition } = props; + if (dataColumns?.length == 0) { + return []; + } + const select: Select = { commandType: 'select', from: {