Skip to content

Commit

Permalink
fix: support ssr (#2608)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 authored Jul 24, 2024
1 parent 80e6e31 commit e1f21ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/util/src/rc/chart-loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export interface ChartLoadingConfig {
}

const shadowLoading = (ele: HTMLElement) => {
if (typeof document === 'undefined') {
return 'loading';
}
const shadowRoot = ele.attachShadow({ mode: 'open' });
const shadowDiv = document.createElement('div');
const shadowStyle = document.createElement('style');
Expand Down

0 comments on commit e1f21ba

Please sign in to comment.