Skip to content

Commit 29cbc70

Browse files
Copilothotlong
andcommitted
fix: handle initialReport becoming undefined in useEffect sync
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 1b129b0 commit 29cbc70

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

apps/console/src/components/ReportView.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ export function ReportView({ dataSource: _dataSource }: { dataSource?: any }) {
3030

3131
// Sync reportData when metadata finishes loading or reportName changes
3232
useEffect(() => {
33-
if (initialReport) {
34-
setReportData(initialReport);
35-
}
33+
setReportData(initialReport);
3634
}, [initialReport]);
3735

3836
if (loading) {

0 commit comments

Comments
 (0)