diff --git a/packages/core/src/render.ts b/packages/core/src/render.ts index 38d2b3a8..6bb23976 100644 --- a/packages/core/src/render.ts +++ b/packages/core/src/render.ts @@ -66,6 +66,8 @@ const secondAggRR = (data: any, state: UpsetConfig) => { * @returns The sorted rows based on the RR and the provided sorting options. */ const sortByRR = (data: any, state: UpsetConfig) => { + if (!Object.hasOwn(data, 'sets')) return { order: [], values: {} }; + const vSets: Sets = Object.fromEntries(Object.entries(data.sets as Sets).filter(([name, _set]) => state.visibleSets.includes(name))); const rr = secondAggRR(data, state);