We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14bcf61 commit f593337Copy full SHA for f593337
src/analytics/eventContext.ts
@@ -5,7 +5,12 @@ import { type PosthogEvent } from "./events";
5
* @returns Context values, all lowercase strings.
6
*/
7
export function getEventContextValues(event: PosthogEvent): string[] {
8
- return event.properties.context?.split(" ").map((v) => v.toLowerCase()) ?? [];
+ return (
9
+ event.properties.context
10
+ ?.split(" ")
11
+ .filter((str) => str !== "")
12
+ .map((v) => v.toLowerCase()) ?? []
13
+ );
14
}
15
16
export function setEventContextValues(
0 commit comments