mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-04 16:13:23 +00:00
The button is disabled once isCopied is true, but copy() is now async, so isCopied and the disabled prop only catch up after it resolves. Clicks landing inside that window both passed the guard and started a write. Nothing leaked, since the existing clearTimeout already handled the duplicate timer, but the window did not exist before copy-to-clipboard 4 made the call async. A ref cleared in finally closes it. Raised by CodeRabbit on #2762. 598 tests pass, build and lint unchanged.