Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

fix isEventFilter condition (#6399)

RobertJoonasc9eb3e217a98
diff --git a/assets/js/dashboard/util/filters.js b/assets/js/dashboard/util/filters.js
index 6a960d3531..22f34798c6 100644
--- a/assets/js/dashboard/util/filters.js
+++ b/assets/js/dashboard/util/filters.js
@@ -201,7 +201,13 @@ const VISIT_PREFIX = 'visit:'
export function hasEventFilters(dashboardState) {
return dashboardState.resolvedFilters.some(
- ([_operation, filterKey, _clauses]) => EVENT_FILTER_KEYS.has(filterKey)
+ ([_operation, filterKey, _clauses]) => isEventFilterKey(filterKey)
+ )
+}
+
+function isEventFilterKey(filterKey) {
+ return (
+ EVENT_FILTER_KEYS.has(filterKey) || filterKey.startsWith(EVENT_PROPS_PREFIX)
)
}
@@ -209,10 +215,7 @@ function remapFilterKey(filterKey) {
if (NO_PREFIX_KEYS.has(filterKey)) {
return filterKey
}
- if (
- EVENT_FILTER_KEYS.has(filterKey) ||
- filterKey.startsWith(EVENT_PROPS_PREFIX)
- ) {
+ if (isEventFilterKey(filterKey)) {
return `${EVENT_PREFIX}${filterKey}`
}
return `${VISIT_PREFIX}${filterKey}`