fix(viz-gallery): respect denylist in viz gallery (#22658)

This commit is contained in:
Ville Brofeldt
2023-01-10 19:08:30 +02:00
committed by GitHub
parent 1e3746be21
commit 08f45ef207
33 changed files with 111 additions and 123 deletions

View File

@@ -18,9 +18,10 @@
*/
import { BootstrapData } from 'src/types/bootstrapTypes';
import { DEFAULT_BOOTSTRAP_DATA } from 'src/constants';
export default function getBootstrapData(): BootstrapData {
const appContainer = document.getElementById('app');
const dataBootstrap = appContainer?.getAttribute('data-bootstrap');
return dataBootstrap ? JSON.parse(dataBootstrap) : {};
return dataBootstrap ? JSON.parse(dataBootstrap) : DEFAULT_BOOTSTRAP_DATA;
}