Skip to content

Commit 739b1b7

Browse files
committed
Lazy load css for legacy themes
1 parent e604f0c commit 739b1b7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/components/AgGrid.react.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ function DashAgGrid(props) {
103103

104104
const shouldLoadLegacyCSS = useMemo(() => {
105105
// Only load legacy CSS if theme is 'legacy' or unset
106+
const dashGridOptions = props.dashGridOptions || {};
106107
return (
107-
!('theme' in props.dashGridOptions) ||
108-
props.dashGridOptions.theme === 'legacy'
108+
!('theme' in dashGridOptions) || dashGridOptions.theme === 'legacy'
109109
);
110-
}, [props.dashGridOptions.theme]);
110+
}, [props.dashGridOptions]);
111111

112112
const LegacyThemeLoader = useMemo(() => {
113113
if (

0 commit comments

Comments
 (0)