Skip to content

Commit c7f7655

Browse files
committed
fix typscript
1 parent 3ba7adf commit c7f7655

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/ChartUPlot.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ const ChartUPlot = forwardRef<any, UPlotProps>(
176176
const { width, height } = useWindowDimensions();
177177
let webref: any = useRef(null);
178178
const uplotInstance = useRef<any>(null);
179-
const dataRef = useRef(data);
179+
const dataRef = useRef<number[][]>(data as number[][]);
180180
const initialized = useRef(false);
181181

182182
const bgColor = style?.backgroundColor || 'transparent';
@@ -387,7 +387,7 @@ const ChartUPlot = forwardRef<any, UPlotProps>(
387387
return;
388388
}
389389

390-
window[name] = value;
390+
(window as any)[name] = value;
391391
} else {
392392
if (!webref) {
393393
console.error('WebView reference is not set');

0 commit comments

Comments
 (0)