Commit f4b4a82
committed
fix: cache hosted pairing request at module level to survive remounts
readHostedPairingRequest() was called inside useRef() which re-initializes
on remount. After the first mount, stripPairingTokenFromUrl() removes the
token from the URL, so any subsequent remount (React Strict Mode, Suspense,
parent key change) would read null from the stripped URL and show a
misleading 'missing host or token' error.
Cache the result in a module-level variable so it persists across remounts.1 parent 0d692d0 commit f4b4a82
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
164 | 172 | | |
165 | | - | |
| 173 | + | |
166 | 174 | | |
167 | 175 | | |
168 | 176 | | |
| |||
0 commit comments