msyavuz commented on code in PR #35998:
URL: https://github.com/apache/superset/pull/35998#discussion_r2522988830
##########
superset-frontend/src/components/Chart/chartAction.js:
##########
@@ -422,6 +424,14 @@ export function exploreJSON(
dispatch(updateDataMask(formData.slice_id, dataMask));
};
dispatch(chartUpdateStarted(controller, formData, key));
+ /**
+ * Abort in-flight requests after the new controller has been stored in
+ * state. Delaying ensures we do not mutate the Redux state between
+ * dispatches while still cancelling the previous request promptly.
+ */
+ if (prevController) {
+ setTimeout(() => prevController.abort(), 0);
+ }
Review Comment:
Now we should not need setTimeout no?
--
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]