Skip to content

Commit 26c6d95

Browse files
committed
fixed groupBy board_coumns being added to non board collections query
1 parent 06d6b2d commit 26c6d95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/notion-client/src/notion-api.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,9 @@ export class NotionAPI {
328328
) {
329329
const type = collectionView?.type
330330
const isBoardType = type === 'board'
331-
const groupBy =
332-
collectionView?.format?.board_columns_by ||
333-
collectionView?.format?.collection_group_by
331+
const groupBy = isBoardType
332+
? collectionView?.format?.board_columns_by
333+
: collectionView?.format?.collection_group_by
334334

335335
let filters = []
336336
if (collectionView.format?.property_filters) {

0 commit comments

Comments
 (0)