|
|
@@ -130,10 +130,15 @@ export function ensureQueries(queries?: DataQuery[]): DataQuery[] {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * A target is non-empty when it has keys other than refId and key.
|
|
|
+ * A target is non-empty when it has keys (with non-empty values) other than refId and key.
|
|
|
*/
|
|
|
export function hasNonEmptyQuery(queries: DataQuery[]): boolean {
|
|
|
- return queries.some(query => Object.keys(query).length > 2);
|
|
|
+ return queries.some(
|
|
|
+ query =>
|
|
|
+ Object.keys(query)
|
|
|
+ .map(k => query[k])
|
|
|
+ .filter(v => v).length > 2
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
export function calculateResultsFromQueryTransactions(
|