fix(buffer): avoid merging properties

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-09-09 15:23:37 +02:00
committed by Carl-Gerhard Lindesvärd
parent 3ee3ee902e
commit dbc2a32458

View File

@@ -1,4 +1,4 @@
import { groupBy } from 'ramda'; import { groupBy, omit, pick } from 'ramda';
import SuperJSON from 'superjson'; import SuperJSON from 'superjson';
import { deepMergeObjects } from '@openpanel/common'; import { deepMergeObjects } from '@openpanel/common';
@@ -92,7 +92,7 @@ export class EventBuffer extends RedisBuffer<IClickhouseEvent> {
}); });
const event = deepMergeObjects<IClickhouseEvent>( const event = deepMergeObjects<IClickhouseEvent>(
lastEventWithData?.event || {}, omit(['properties', 'duration'], lastEventWithData?.event || {}),
item.event item.event
); );