Commit ffe2d6c
fix(feedback): Guard show/hide against uninitialized _setVisibility (#6435)
* fix(feedback): Guard show/hide against uninitialized _setVisibility
When Sentry.showFeedbackForm() (or the equivalent Button/Screenshot
show/hide) is called before FeedbackFormProvider has mounted and run
initialize(), the static _setVisibility was undefined. The guard
`_setVisibility !== NOOP_SET_VISIBILITY` evaluated true and the code
called undefined(true), throwing TypeError.
Default the static field to NOOP_SET_VISIBILITY at declaration so the
guard correctly falls through to the intended console.warn fallback.
Fixes SDK-CRASHES-REACT-NATIVE-62C
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* docs: Add CHANGELOG entry for #6435
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Alexander <alex@apantiukhov.com>1 parent 208bf09 commit ffe2d6c
3 files changed
Lines changed: 27 additions & 1 deletion
File tree
- packages/core
- src/js/feedback
- test/feedback
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
90 | 113 | | |
91 | 114 | | |
92 | 115 | | |
| |||
0 commit comments