kgabryje commented on a change in pull request #16444:
URL: https://github.com/apache/superset/pull/16444#discussion_r696593715
##########
File path:
superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts
##########
@@ -68,13 +69,15 @@ export default function getFormDataWithExtraFilters({
// if dashboard metadata + filters have not changed, use cache if possible
if (
- (cachedFiltersByChart[sliceId] || {}) === filters &&
- (colorScheme == null ||
- cachedFormdataByChart[sliceId].color_scheme === colorScheme) &&
- cachedFormdataByChart[sliceId].color_namespace === colorNamespace &&
- isEqual(cachedFormdataByChart[sliceId].label_colors, labelColors) &&
+ cachedFiltersByChart[sliceId] === filters &&
+ (colorScheme === null ||
+ cachedFormdataByChart[sliceId]?.color_scheme === colorScheme) &&
+ cachedFormdataByChart[sliceId]?.color_namespace === colorNamespace &&
+ isEqual(cachedFormdataByChart[sliceId]?.label_colors, labelColors) &&
!!cachedFormdataByChart[sliceId] &&
- dataMask === undefined
+ areObjectsEqual(cachedFormdataByChart[sliceId]?.dataMask, dataMask, {
+ ignoreUndefined: true,
+ })
Review comment:
Great point Stephen! I think we can safely remove `colorScheme === null`
and `?? undefined`
--
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]