sadpandajoe commented on code in PR #40833:
URL: https://github.com/apache/superset/pull/40833#discussion_r3483106364
##########
superset-frontend/src/utils/navigationUtils.ts:
##########
@@ -30,7 +32,10 @@ export const navigateTo = (
'noopener noreferrer',
);
} else if (options?.assign) {
- window.location.assign(sanitizeUrl(ensureAppRoot(url)));
+ const sanitized = sanitizeUrl(ensureAppRoot(url));
+ if (pendingAssignUrl === sanitized) return;
+ pendingAssignUrl = sanitized;
Review Comment:
Will this break under some scenarios since this is set but may never be
cleared?
1. hit back button form `/dashboard/new`. The list page restores but
`pendingAssignUrl` is set and `+ Dashboard` won't work anymore, right?
2. a `beforeunload` prompt where the user stays, or a blocking extension,
sets the flag without navigating, permanently killing the button
--
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]