Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(web-analytics): break infinite loop in test account filter (#66533)

Jay Masiwal16b82c2798a7
diff --git a/frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx b/frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx
index 4cfc96a25719..fd660185876d 100644
--- a/frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx
+++ b/frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx
@@ -3318,11 +3318,17 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([
if (active_hours_tab && active_hours_tab !== values._activeHoursTab) {
actions.setActiveHoursTab(active_hours_tab)
}
- if (path_cleaning && path_cleaning !== values.isPathCleaningEnabled) {
- actions.setIsPathCleaningEnabled([true, 'true', 1, '1'].includes(path_cleaning))
+ if (path_cleaning !== undefined) {
+ const parsedPathCleaning = [true, 'true', 1, '1'].includes(path_cleaning)
+ if (parsedPathCleaning !== values._isPathCleaningEnabled) {
+ actions.setIsPathCleaningEnabled(parsedPathCleaning)
+ }
}
- if (filter_test_accounts && filter_test_accounts !== values.shouldFilterTestAccounts) {
- actions.setShouldFilterTestAccounts([true, 'true', 1, '1'].includes(filter_test_accounts))
+ if (filter_test_accounts !== undefined) {
+ const parsedFilterTestAccounts = [true, 'true', 1, '1'].includes(filter_test_accounts)
+ if (parsedFilterTestAccounts !== values.shouldFilterTestAccounts) {
+ actions.setShouldFilterTestAccounts(parsedFilterTestAccounts)
+ }
}
if (
compare_filter &&