Skip to content

Commit

Permalink
fix: assume typeless series nodes are of type events node (#19550)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilbert09 authored and fuziontech committed Jan 4, 2024
1 parent fb2f348 commit 5022b14
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ describe('actionsAndEventsToSeries', () => {
expect(result[1].name).toEqual('item1')
expect(result[2].name).toEqual('item2')
})

it('assumes typeless series is an event series', () => {
const events: ActionFilter[] = [{ id: '$pageview', order: 0, name: 'item1' } as any]

const result = actionsAndEventsToSeries({ events })

expect(result[0].kind === NodeKind.EventsNode)
})
})

describe('cleanHiddenLegendIndexes', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const actionsAndEventsToSeries = ({
id: f.id,
...shared,
}
} else if (f.type === 'events') {
} else {
return {
kind: NodeKind.EventsNode,
event: f.id,
Expand Down

0 comments on commit 5022b14

Please sign in to comment.