Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro committed Jan 10, 2023
1 parent b707d4e commit 33a7390
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion superset-frontend/src/addSlice/AddSliceContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const ESTIMATED_NAV_HEIGHT = 56;
const ELEMENTS_EXCEPT_VIZ_GALLERY = ESTIMATED_NAV_HEIGHT + 250;

const bootstrapData = getBootstrapData();
const denyList: string[] = bootstrapData.common.conf.VIZ_TYPE_DENYLIST;
const denyList: string[] = bootstrapData.common.conf.VIZ_TYPE_DENYLIST || [];

const StyledContainer = styled.div`
${({ theme }) => `
Expand Down
4 changes: 1 addition & 3 deletions superset-frontend/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ export const NULL_DISPLAY = 'N/A';

export const DEFAULT_COMMON_BOOTSTRAP_DATA: CommonBootstrapData = {
flash_messages: [],
conf: {
VIZ_TYPE_DENYLIST: [],
},
conf: {},
locale: 'en',
feature_flags: {},
language_pack: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ interface VizTypeControlProps {
}

const bootstrapData = getBootstrapData();
const denyList: string[] = bootstrapData.common.conf.VIZ_TYPE_DENYLIST;
const denyList: string[] = bootstrapData.common.conf.VIZ_TYPE_DENYLIST || [];
const metadataRegistry = getChartMetadataRegistry();

export const VIZ_TYPE_CONTROL_TEST_ID = 'viz-type-control';
Expand Down

0 comments on commit 33a7390

Please sign in to comment.