- 已装运
- 2026年8月25日 21:24 UTC
- 作者
- Kamo
- 提交
- b48f396
The button already carried disabled={!selected || submitting}, but submitting was only true for the duration of the request. On success the page sets redirecting, clears choosing, and then waits 600ms before navigating — and in that gap finally had already re-enabled the button, which went back to reading "Continue to <org>" and was clickable again. A second click there spends a token the first click has just used, so it answers 401: the one status that sends the member back to the password screen, reporting a timeout that did not happen. So the picker is now disabled for choosing || redirecting, and the guard inside the handler is a ref rather than the choosing state. State is not readable synchronously, so two clicks in the same tick both close over choosing === false and both proceed; the disabled attribute is the visible half of this and cannot be the whole of it. The guard is released only on the paths that leave the member here to try again. It is held through navigation, since finally runs on a return from try like any other exit.