Commit 6a5748e
authored
Fix tool feedback survey (#945)
fix(tool-feedback): guard setSurveyData with mounted ref instead of unsubscribing
Unsubscribing posthog.onFeatureFlags on cleanup removed the handler
before it could fire, leaving surveyData null and the page stuck at
"Loading...". Keep the handler registered (so it fires when flags
load) and gate the setState call on a mounted flag to avoid stale
updates after unmount.1 parent 404be69 commit 6a5748e
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
22 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| |||
0 commit comments