bito-code-review[bot] commented on PR #40833:
URL: https://github.com/apache/superset/pull/40833#issuecomment-4640062713
<!-- Bito Reply -->
The architectural review finding is correct. The `pendingAssignUrl` variable
is defined at the module level and is never reset, which causes subsequent
navigations to the same URL to be ignored after the first successful call. To
resolve this, you can reset the `pendingAssignUrl` after a short delay using
`setTimeout` to allow for repeat actions while still preventing rapid duplicate
clicks.
**superset-frontend/src/utils/navigationUtils.ts**
```
const sanitized = sanitizeUrl(ensureAppRoot(url));
if (pendingAssignUrl === sanitized) return;
pendingAssignUrl = sanitized;
window.location.assign(sanitized);
setTimeout(() => { pendingAssignUrl = null; }, 1000);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]